# What language next?

This topic is 3942 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm thinking its about time I learn a new language, I try to do this regularly and the last one was Ruby about a year ago. Learning new languages is great because they teach you new ways of thinking and solving problems in other languages too. Does anyone have a tip for a language that would be useful to learn? I'm thinking about Eiffel or OCaml, but I'm not sure. I want a language that will teach me new things, not something like C# (I'v skimmed books about it, looked at code and I know C++ and Java... and while its nice and a logical evolution of the language family, it is just that - a small evolution). Here are languages I know/have tried, in no particular order: C C++ Python Ruby Java Prolog Pascal QBasic VB Lua SML Erlang Assembler (MIPS) PHP Perl Ook ;) javascript Lisp (used it only for one course once... might be interested in going deeper if people think its worth it, otherwise I think my ruby metaprogramming skills should do) So please hit me with any ideas you have. oh, and don't forget to motivate your choice. [Edited by - rollo on May 5, 2007 11:56:05 AM]

##### Share on other sites
If you're not fairly proficient with regular expressions or sql (as opposed to just not listing them since they're not traditional languages) either would be my recommendation.

##### Share on other sites
no, I use them almost daily, but I was thinking more of something you can run stand-alone, but I guess DSL-y languages are ok too.

##### Share on other sites
How about Haskell? Though you've got some functional stuff in the list you give Haskell is a pure functional, lazy language which is unlike anything in your list. By pure functional I mean that in Haskell there are no side effects and you cannot mutate things, and by lazy I mean something is only evaluated when it has to be, this allows you to easily do things like produce infinite data structures (you can also do this in ML, and indeed in an imperative language it's just more elegant in Haskell).

As to whether Haskell would be useful to learn, it depends upon what you mean by useful :P. It should certainly show you completely new ways of thinking about programming.

##### Share on other sites
Quote:
 Original post by MonderAs to whether Haskell would be useful to learn, it depends upon what you mean by useful :P. It should certainly show you completely new ways of thinking about programming.

Thats what I'm after, otherwise I would be studying C# or COBOL ;D

I did look at Haskell once, but then I found monads and thought "This is some crazy shit man!" X-o I might have a look though, if you recon it is very different from SML and erlang (Erlang is a much more pragmatic language than SML, I get the feeling Haskell is less so than SML, or similar. am I right?)

##### Share on other sites
I'd say Haskell is indeed less pragmatic than SML. It can be interesting though to take a look at: it lets you write algorithms down in quite an elegant manner (laziness, function composition, ...)

If you want something more pragmatic than SML, I'd recommend O'Caml.

I'd personally recommend taking a dive in Common Lisp (I'm not too familiar with Ruby, so it might be that CL is not as innovative to you as it was to me: macro's, and interesting variations on typical concepts such as OO, exceptions, etc.). Also, I'm quite fond of Oz (functional (impurely, like SML), dynamically typed, multi-paradigm, dataflow variables for easy concurrency, ...), and as always in this kind of threads, I would recommend this book: it's a general look at programming languages (describes many different paradigms), and uses Oz to illustrate all these concepts.

Epigram has dependent typing, very interesting, but seems a bit hard to use (after seeing the 2D-syntax and the number of lines needed just to write the successor function, I went on to explore other languages, such as Coq).

##### Share on other sites
I'd try Smalltalk. It's similar to Prolog and Lisp in the way that it expands your way of thinking about programming. It's different, but well worth learning.

##### Share on other sites
Quote:
 Original post by SamLowryI'd say Haskell is indeed less pragmatic than SML. It can be interesting though to take a look at: it lets you write algorithms down in quite an elegant manner (laziness, function composition, ...)If you want something more pragmatic than SML, I'd recommend O'Caml.I'd personally recommend taking a dive in Common Lisp (I'm not too familiar with Ruby, so it might be that CL is not as innovative to you as it was to me: macro's, and interesting variations on typical concepts such as OO, exceptions, etc.). Also, I'm quite fond of Oz (functional (impurely, like SML), dynamically typed, multi-paradigm, dataflow variables for easy concurrency, ...), and as always in this kind of threads, I would recommend this book: it's a general look at programming languages (describes many different paradigms), and uses Oz to illustrate all these concepts.Epigram has dependent typing, very interesting, but seems a bit hard to use (after seeing the 2D-syntax and the number of lines needed just to write the successor function, I went on to explore other languages, such as Coq).

This "Oz" seems to look like Lisp with C syntax. Granted I only read a few pages.

##### Share on other sites
Quote:
 Original post by Alpha_ProgDesThis "Oz" seems to look like Lisp with C syntax. Granted I only read a few pages.

Hmmhmhmhmhm... well it depends what specific aspects you have in mind when you talk about Lisp (assuming you mean Common Lisp). CL is a dynamically typed functional language. So is Oz. So, in that respect, you are right. Personally, I'd rather describe Oz as "a dynamically typed OCaml" than "Lisp with C-syntax" (as Oz works with immutable variables, tuples, match-statements, etc. and has no support (AFAIK) for macros and other crazy Lisp-stuff).

The biggest difference between Oz and (most) other languages are dataflow variables (I have the feeling I become this site's big Oz-fanboy, but I just think it deserves a little more attention than it currently gets): these are variables which can be in unbound state (meaning they are not bound to any value whatsoever), and can only be bound once. The interesting behavior comes when you try to read an unbound variable: the thread blocks and waits until the variable is bound (by another thread).

declare QuickSortfun {QuickSort Lst Pred}   case Lst of      nil then nil   [] [X] then [X]   [] X|XS then local		   L R SL SR		in		   thread {List.partition XS fun {\$ Y} {Pred Y X} end L R} end		   thread SL = {QuickSort L Pred} end		   thread SR = {QuickSort R Pred} end		   {List.append SL X|SR}		end   endend

is a multithreaded quicksort. Of course, it does create plenty of threads, but Oz uses cheap lightweight threads so that it doesn't collapse under the weight of dozens of threads.

##### Share on other sites
I'm thinking Haskell. Possibly Ocaml, but I don't know that it's that far removed from SML. C# will take you all of an hour or two to get going with, if that. Might want to play with it just so you can say you know it.

##### Share on other sites
Nice list, C# is a good language to know even though it really isn't that different from Java, it even shares many of Javas performance pitfalls so it shouldn't take that much time to get started with.

For something completely new i wouldn't know unless you enjoy esoteric languages.

PATH for example is fairly nice http://pathlang.sourceforge.net

Whirl is another of my personal favourites http://www.bigzaphod.org/whirl/
There is also a flash based graphical VM for it at http://www.bigzaphod.org/whirl/Whirl-1.01.swf that allows you to see exactly what your program does. (makes debugging alot easier)

##### Share on other sites
hmm, yeah, I guess I probably should write something in C# so I can put it on my CV ;) I'v only written some tiny classes to try out unittesting in MonoDevelop on Gnome.

...Or I can dodge the whole thing and just write .NET since Microsoft has gotten ruby running on their VM ;D

Whirl looks pretty cool, but I was after something a bit less esoteric, something that doesn't make me want to kill myself if I have to write something larger than hello world ;)

So far I'm leaning towards Haskell, SmallTalk seems very similar to Ruby which is what I work with a lot at the moment, so I'd prefer something different in my spare time.

Has anyone tried ADA? All I know about it is that its exception handling blew up a space shuttle...

How about Eiffel? Design By Contract build into the language looks very useful, especially if it work with inheritance etc.

##### Share on other sites
I also recommend Haskell, and I'll point out that it has an active community around it and is a "living" language. So in that respect at least I'd say it was more pragmatic than SML.

If you are looking for a really pragmatic language to use where you might usually use C++ or C# due to high performance requirements, you might want to check out OCaml or F# instead. OCaml is very similar to SML but has a much nicer implementation. F# shares a core language with OCaml and gives you access to .Net's libraries. This F# video is quite impressive.

Quote:
 Original post by SamLowryEpigram has dependent typing, very interesting, but seems a bit hard to use (after seeing the 2D-syntax and the number of lines needed just to write the successor function, I went on to explore other languages, such as Coq).
It's shorter in Coq!? [wink]

##### Share on other sites
Quote:
Original post by Rebooted
Quote:
 Original post by SamLowryEpigram has dependent typing, very interesting, but seems a bit hard to use (after seeing the 2D-syntax and the number of lines needed just to write the successor function, I went on to explore other languages, such as Coq).
It's shorter in Coq!? [wink]

I was wondering how many people would notice the irony :)

I went on to Coq because it seemed more mature and more powerful. If I was going to tackle on some very theoretical stuff, I might as well go all the way there.

##### Share on other sites
As I said Here, I think Lisp is definitely worth learning to a meaningful degree of mastery. Metaprogramming is something that's becoming somewhat more popular, but Lisp did it first and did it very differently from most other languages. The idea that data and code are no different is very powerful.