Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #2312
| From | Johnny Morrice <spoon@killersmurf.com> |
|---|---|
| Newsgroups | comp.lang.ruby |
| Subject | Re: functional languages -- any recommendations? |
| Date | 2011-04-05 04:13 -0500 |
| Organization | Service de news de lacave.net |
| Message-ID | <20110405101339.52fe20a5@fractal> (permalink) |
| References | <e5d09644917d0fada5c50cf47289944f@ruby-forum.com> |
On Tue, 5 Apr 2011 10:17:39 +0900
7stud -- <bbxx789_05ss@yahoo.com> wrote:
> Haskell, Scala, or Erlang? Which one is the best?
What about Racket, the descendent of PLT scheme?
http://racket-lang.org/
I'd say it's just as good for learning about functional programming as
the others, but it also makes it easy to write something useful.
For instance, it has a nifty DSL for writing web-sites. Unimaginatively
of me, here is an example from their home page:
#lang web-server/insta
;; A "hello world" web server
(define (start request)
(response/xexpr)
'(html
(body "Hello World")))
The standard libraries include a web-server, and if you use that DSL,
it'll start it up for you, and just serve your site, no extra
configuration required. Which is pretty cool for learning at least.
It comes with OpenGL too, which is great if you like writing games :D
Also, it supports objects and classes, so you won't into the problems
described below.
Not so many libraries as Scala and Haskell though. And slower too.
You can tell I'm a "fan-boy". I swear I'm not a PLT plant!
But on to the others:
Haskell doesn't have the feature called inheritance in Object Oriented
Languages*.
Living without objects is okay, but it means you can't create a new
data-type that inherits members from another data-type.
It has other mechanisms for code-reuse, but sometimes things which
would be really simple with, for example, a template method, into a bit
of an exercise in formal logic. Still, that's okay because that's
pretty much how you program the whole of the system in Haskell.
Haskell has a really cool macro system called Meta-Haskell. It's
basically like an interface to a compiler front-end so you can create,
explore or transform a Haskell abstract syntax tree, or fragments
thereof. It's super-awesome :D
Erlang doesn't have inheritance either but it doesn't become an exercise
in logic the same way because it doesn't have static-typing.
IIRC their structures are just transformed into a vector or something at
compile time, there's no real notion of a member of a data-structure.
I really like erlang though, the syntax is cool. Commas.
Apologies for the long post!
* Haskellers would probably call inheritance "sub-type polymorphism",
sitting in their tweed and smoking their pipes, etc.
Back to comp.lang.ruby | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
functional languages -- any recommendations? 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-04 20:17 -0500
Re: functional languages -- any recommendations? Josh Cheek <josh.cheek@gmail.com> - 2011-04-04 22:37 -0500
Re: functional languages -- any recommendations? Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-04-05 00:29 -0500
Re: functional languages -- any recommendations? Tony Arcieri <tony.arcieri@medioh.com> - 2011-04-05 00:47 -0500
Re: functional languages -- any recommendations? Peter Hickman <peterhickman386@googlemail.com> - 2011-04-05 03:47 -0500
Re: functional languages -- any recommendations? Brian Candler <b.candler@pobox.com> - 2011-04-05 03:54 -0500
Re: functional languages -- any recommendations? Johnny Morrice <spoon@killersmurf.com> - 2011-04-05 04:13 -0500
Re: functional languages -- any recommendations? Johnny Morrice <spoon@killersmurf.com> - 2011-04-05 05:14 -0500
Re: functional languages -- any recommendations? Brian Candler <b.candler@pobox.com> - 2011-04-05 07:43 -0500
Re: functional languages -- any recommendations? Johnny Morrice <spoon@killersmurf.com> - 2011-04-05 08:09 -0500
Re: functional languages -- any recommendations? Brian Candler <b.candler@pobox.com> - 2011-04-05 10:36 -0500
Re: functional languages -- any recommendations? serialhex <serialhex@gmail.com> - 2011-04-05 11:21 -0500
Re: functional languages -- any recommendations? Tony Arcieri <tony.arcieri@medioh.com> - 2011-04-05 12:30 -0500
Re: functional languages -- any recommendations? serialhex <serialhex@gmail.com> - 2011-04-06 13:04 -0500
Re: functional languages -- any recommendations? Johnny Morrice <spoon@killersmurf.com> - 2011-04-06 14:08 -0500
Re: functional languages -- any recommendations? 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-06 19:30 -0500
csiph-web