LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Haskell, OCaml, Scheme, Erlang, Perl, Python, Ruby (http://www.linuxquestions.org/questions/programming-9/haskell-ocaml-scheme-erlang-perl-python-ruby-574902/)

manolakis 08-05-2007 04:03 PM

Haskell, OCaml, Scheme, Erlang, Perl, Python, Ruby
 
Hi there
Does anybody know what the following languages can do better than Java or what generally are useful for?
Quote:

Haskell, OCaml, Scheme, Erlang, Perl, Python, Ruby
Thanks

acid_kewpie 08-05-2007 04:08 PM

please forgive me if i'm reading this out of context, but this really sounds like homework or such like. if you need to know a bit about each of these languages, then a google search really is one of the bests ways to get that overview. in actual fact you'd probably need to back up to different types of language, declarative, functional etc... as they work in such different ways a compare and contrast between languages of types can become very hard.

indienick 08-06-2007 12:46 AM

This is nothing a moderately quick Wikipedia search can help you with.

Perl is used mostly for parsing data (well, that's what its original purpose was).
Python - I see it as a "BASIC for UNIX" type of language, but much more sophisticated.
Scheme is a Lisp derivative (like Common Lisp), symbolic computation and AI programming with a heavy mathematical inclination.
Ruby, I see, aims to be an "everything is an object" type interpreted language.

I don't know what Haskell, OCaml and Erlang are reserved for, though.

acid_kewpie 08-06-2007 03:25 AM

Quote:

Python - I see it as a "BASIC for UNIX" type of language, but much more sophisticated.
wtf? what planet are you from?? i can't see any reason to ever compare the two languages, they are about as different as modern languages get from each other.

bigearsbilly 08-06-2007 06:45 AM

agreed,
apart from implying BASIC is a modern language
;)

makyo 08-06-2007 07:06 AM

Hi.

I have found this general article to be useful http://en.wikipedia.org/wiki/Compari...ming_languages

It contains links to more specific articles, and has a number of additional references ... cheers, makyo

Defunct 08-06-2007 12:31 PM

I know that both Haskell and OCaml are functional programming languages.

Both Scheme and Ruby are multi paradigm, with Scheme tending more towards functional programming.

The "series of tubes" is a good way to find this stuff out and is faster than asking on a forum.

indienick 08-06-2007 10:56 PM

Quote:

Originally Posted by acid_kewpie
wtf? what planet are you from?? i can't see any reason to ever compare the two languages, they are about as different as modern languages get from each other.

Yikes - sorry. I just likened it to BASIC due to the syntax, and variable declaration method (dynamic typecasting, instead of static type declaration). That's how I saw Python as acting when I first used it.

I'm sorry if I offended you to any great degree.
I take it back.

taylor_venable 08-06-2007 11:10 PM

:D It's my sig!

Anyway, let me sum it up briefly, but there's really much more to it than this. These are among my favorite languages.

Haskell is purely functional, but with the power of monads becomes useful for real programming tasks. A lot of mathematical programs are very easy with Haskell, that's why I use it for work on Project Euler.

Objective Caml brings easier capability to functional programming, like the use of references and (kind-of) objects. And it's super fast, even faster than C++ in some cases. Also, the debugger can step forward AND backward through execution.

Scheme is a nice, smallish language. Very simple, and as such it makes learning some of the core concepts of computing science simplistic. Also, it has a very bare implementation of continuations and guarantees tail recursion.

Erlang combines awesome functional features with awesome concurrency features. Start several Erlang processes (they're like threads) on several CPUs or on several machines, then have them talk to each other transparently over the network. Messages are composed of Erlang objects, so there's no encoding / decoding.

Perl is just great for any kind of quick text processing. Truly flexible to the last.

Python is nice and flexible in an object-oriented way. Good for programming in the extremely large, as far as object organization goes, but a tad on the slow side. It's like an extremely liberating Java.

Ruby is very intuitive and easy to write. Plus, it's awesome for metaprogramming, even moreso than Python. Almost the best of both Perl and Python, except Python has a more transparent object model.

Click on the links to get more information about any of these languages. They might not all appeal to you, but I myself am somewhat of a computer linguist. Learning multiple languages can never hurt, and often discovering something about a new language will reveal a new truth about your favorite and most commonly used one.

Happy hacking!


All times are GMT -5. The time now is 09:29 PM.