Jump to content
  • Advertisement
Sign in to follow this  
rollo

What language next?

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites
Quote:
Original post by Monder
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.


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 this post


Link to post
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 this post


Link to post
Share on other sites
Quote:
Original post by SamLowry
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).


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

Share this post


Link to post
Share on other sites
Quote:
Original post by Alpha_ProgDes
This "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 QuickSort
fun {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
end
end

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 this post


Link to post
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 this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!