Thread overview
Re: OCaml
Jan 20, 2003
Mark Evans
Jan 21, 2003
Ilya Minkov
Jan 22, 2003
Mark Evans
Jan 24, 2003
Ilya Minkov
Feb 06, 2003
Steven Shaw
January 20, 2003
http://www.venge.net/graydon/talks/mkc/html/index.html

These slides show that a hybrid functional/imperative language can still look like C and do C-ish things.  There are side-by-side comparisons of C and OCaml code.  That is the main reason I post it here.

OCaml syntax is pretty bad, but then so is C; we're just more used to it.

OCaml is well known for facilitating parsers and these slides demonstrate that capability if you're interested.

Mark


January 21, 2003
This example shows exactly the other way around doing it normally in OCaml. It's really much simpler. No need to use OCamlP4, AFAIK. A simple BASIC interpreter example (actually two of them) in the O'Reily book does it with less trouble.

However, it shows how to transform the tree into the C source, which is important. Not much of it though.

-i.

Mark Evans wrote:
> http://www.venge.net/graydon/talks/mkc/html/index.html
> 
> These slides show that a hybrid functional/imperative language can still look
> like C and do C-ish things.  There are side-by-side comparisons of C and OCaml
> code.  That is the main reason I post it here.
> 
> OCaml syntax is pretty bad, but then so is C; we're just more used to it.
> 
> OCaml is well known for facilitating parsers and these slides demonstrate that
> capability if you're interested.
> 
> Mark
> 


January 22, 2003
Ilya I just wanted all the C folks around here to feel comfortable investigating OCaml.  Why don't you post an example of the True OCaml Way to let them see the power they are missing.

Mark

Ilya Minkov says...
>
>This example shows exactly the other way around doing it normally in OCaml.


January 24, 2003
Mark Evans wrote:
> Ilya I just wanted all the C folks around here to feel comfortable investigating
> OCaml.  Why don't you post an example of the True OCaml Way to let them see the
> power they are missing.
> 
> Mark

It goes out of the scope of this newsgroup. And i don't have enough time. OCamlP4 is good, when arbitrary code has to be translated into OCaml abstract syntax tree for direct execution. But when arbitrary code has to be translated into C or something else, internal means are quite right. IMO, using them should not differ much, so it doesn't even add anything ineteresting to discuss.

I guess i'll keep silent (and busy) for a couple of weeks. I feel like this newsgroup is becoming too crowded. That's probably why Pavel has disappeared, he must have limited time.

-i.

February 06, 2003
> These slides show that a hybrid functional/imperative language can still
look
> like C and do C-ish things.  There are side-by-side comparisons of C and
OCaml
> code.

OCaml is nice. I was learning it a while ago (I've moved on since but I will definely get back to it). The trouble with OCaml is that it can't compare with other languages if your application needs threads which take advantage of SMP (the runtime is non-reentrant).

Steve.