File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Functional Programming and the fly likes Please suggest some other language to use when reading SICP ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Functional Programming
Bookmark "Please suggest some other language to use when reading SICP ?" Watch "Please suggest some other language to use when reading SICP ?" New topic
Author

Please suggest some other language to use when reading SICP ?

Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 761

Hello,

I plan to reread SICP.

I don't plan to use MIT Scheme http://mitpress.mit.edu/sicp/scheme/index.html

What modern functional language would you recommend ?

Thanks

Pho


Regards,

Pho
Sean Corfield
Ranch Hand

Joined: Feb 09, 2011
Posts: 252
    
    5

The obvious answer would be Clojure.

At least one person has been converting the SICP examples to Clojure and publishing them on Github, I believe.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41068
    
  43
A standard Scheme implemented in Java is Kawa. Whether something iike Clojure or Scala is appropriate depends on whether you want to stick with standard Scheme syntax.


Ping & DNS - my free Android networking tools app
Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 761

It is not important for it to be Lisp-y or scheme-like.
Sean Corfield
Ranch Hand

Joined: Feb 09, 2011
Posts: 252
    
    5

Well, solutions written in anything non-Lisp-y is going to look very different - and there may well be parts of SICP that rely on features in Lisps, such as macros. Of course there may also be parts of SICP that rely on mutable data which would have to look rather different in Clojure too...

If you don't plan on using Scheme or Clojure, I guess my question would be: Why not?

SICP is written around a dynamically typed Lisp dialect. Clojure is the closest modern equivalent. Other options might be Erlang, F#, Haskell, or Ocaml - although you might argue Erlang, Haskell and Ocaml are not really "modern" so that's why I'd want to know more about your reasoning before trying to suggest other languages...
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1609
    
  13

+1 for Clojure as it would seem to offer you the benefits of a "modern" functional language, plus access to the JVM platform, and as a Lisp language should not offer too many obstructions/diversions in implementing the ideas from SICP.

You could look at Racket which is based on Scheme and is fun to use, although unlike Clojure it doesn't seem to be used much outside academia.

If you're determined to stay away from Lisps, maybe Scala would count as a "modern" FP language which is gaining traction in industry, but you may find you have to spend a lot more time trying to translate Scheme-based examples into an OO/FP hybrid language like Scala with its sophisticated (and fairly perplexing) static type system.

Haskell or ML would spare you the OO diversions of Scala, but you're still dealing with static typing again.


No more Blub for me, thank you, Vicar.
Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 761

Ok. I think I will choose Clojure based on your inputs.
Sean Corfield
Ranch Hand

Joined: Feb 09, 2011
Posts: 252
    
    5

And there's a Clojure forum here on the ranch where you can ask for help, if needed!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Please suggest some other language to use when reading SICP ?
 
Similar Threads
Functional Language - Clojure
Scheme
Hello Cay and Gary
7 Wonders of Programming Languages
Real-life Clojure examples