Many a language war has started over such an innocuous question.  :-)

Having translated large chunks into Alice, my conclusion would be that Oz was indeed the correct choice for the programming language of CTM - given the breadth of "concepts", "techniques" and "models" covered in the book. Alice ML has much to offer and comes closest to matching the majority of CTM, adding static typing, as well as a number of other nice things. But the object oriented chapters were difficult and relational programming still has me stumped. Beyond that, it amazes me how well the languages map to each other, given that one is dynamically typed and the other statically typed.

If I was given the task of translating CTM to yet another language, it'd be Scheme/Kanren. Kanren could be used to translate relational programming (chapter 9), though you'd likely struggle with constraint programming (chapter 12). But then I don't find the mixture of Scheme and Kanren code quite as smooth as between ML and Promises - much less Oz's Dataflow variables.

O'Caml is also a nice language, but it lacks Alice's promises or Scheme/Kanren's Fresh variables (which aren't full dataflow variables, but at least these get you close). Some of the object oriented examples would be easier to translate, but given CTM's leaning towards a Smalltalk dynamic model, there'd still be plenty to fret over.

For myself, I've been slowly trying to learn Oz, ML, Scheme and Haskell. All four are excellent languages and offer the most fecund communities for anyone interested in programming and programming languages. But then I'm likely not much help in trying to select from the various universe of alternatives, especially when time is a constraint. I'd be inclined to keep Oz on the list of viable languages - I find that it grows on you - and once you've been exposed to dataflow variables, you'll wonder how you could possibly live without them. But while you're making up your mind, I can suggest the Alice translation of CTM (and the first chapter of SICP which translates from the original Scheme into Oz, Alice, O'Caml and Haskell):

http://www.codepoetics.com/wiki/index.php?title=Topics:CTM_in_other_languages:Alice_ML

Chris Rathman


Ramon Diaz-Uriarte wrote:
Please forgive if this question is slightly off-topic here. I am
working through "Concepts, techniques, and models of computer
programming" and I am finding it quite enjoyable and enlightening. I
am considering learning a new language for "real work" and I'd like to
ask for suggestions.

I work mainly in statistics and bioinformatics, do most of my
programming in Python (general stuff, web-based interfaces), R
(statistics), and a little bit of C/C++ (for those few things that are
speed-critical), including MPI (and, lately, I've been considering UPC
---unified parallel C).

Though I am enjoying CTM, I am not sure Mozart/Oz would be the best
choice for the types of things I do and to nail down most of those new
concepts in CTM I'd really need to work on them (ideally on a "real
problem"). Thus, I've been pondering over the possible choices, and
I'd really like to get some advice/comments/suggestions.

Ideally, I'd like a multiparadigm language that includes, at least,
functional programming and that deals nicely with concurrency and
distributed computing (C/C++ with MPI is not exactly fun for me), that
runs on Linux/Unixes in both 32 and 64 bit architec., that has good
support for I/O and file processing, Web programming,
numerical/scientific computations, and interfaces to other languages.
Other nice features would be good debuggers, comprehensive docs, easy
use of literate programming, and speed at least comparable to Python
(but better if closer to C, to avoid most of my C + MPI stuff),
Regarding specific choices, I looked initially at Haskell, but the IO
difficulties that could arise in debugging (simple use of printf-like
approaches) and its lazy evaluation do not appeal to me. It seems to
have good support (via added libs.) for concurrency.

Thus, I've been left with three likely options:

Alice/Standard ML (or SML and Alice when needed), Ocaml, Scheme
(probably in its PLT or Bigloo implementations).

Alice certainly covers the concurrency/distributed, comes from the
distinguished Mozart/Oz lineage and is SML plus lots of stuff. Speed
issues concern me a little bit.

Ocaml seems to incorporate well several paradigms, though I think the
concurrency and distributed comput. is not as straightforward.

Scheme seems extremely nice (and the lisp I learn would finally help
me configure emacs!) but sometimes I get the feeling it is too much of
a teaching language and I'd soon discard it for real work.


Best,


R.


_________________________________________________________________________________
mozart-users mailing list                               
mozart-users@ps.uni-sb.de
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to