View Full Version : O'Caml and ML?
sans-hubris
04-06-2002, 11:47 PM
How are O'Caml and ML related? Is O'Caml just another version of ML?
well, yeah. I think, except O'Caml is short for Objective Caml, so it takes advantage of objects.
GnuVince
04-07-2002, 06:48 PM
O'Caml is a dialect of ML. It does not follow ML's standard though, and as of such, it's now considered technically better than Standard ML '97.
GnuVince
04-07-2002, 08:43 PM
I might also add that O'Caml is one of the nicest language I've seen
Strike
04-07-2002, 10:13 PM
Except that it has some really weird looking constructs.
GnuVince
04-08-2002, 12:11 AM
Yeah the syntax is way wierd at times. But a great language nonetheless. I'd choose it every day over C/C++
sans-hubris
04-08-2002, 01:22 AM
Thanks for the clarification GnuVince.
BTW, Nafae prefers if you just edit a post rather than posting multiple replies in a row. I personally don't mind, but I'm sure Nafae does.
GnuVince
04-08-2002, 08:08 AM
I edited post #6
jemfinch
05-30-2002, 04:58 PM
ML was originally developed in Edinburgh for a theorem prover. The original architect (his name escapes me) needed something as powerful as Lisp but with much more strict semantics (Theorem provers need to be correct) ML stands for "Meta Language" for some other reason that also escapes me :)
Anyway, there are several implementations of ML (which is just a family of strictly typed, eagerly evaluated functional languages with approximately the same syntax). SML, or Standard ML, is a formally defined language (mathematically formally defined -- probably more formally than almost any language in existence) which, as the name suggests, is generally the "Standard" to which other MLs are compared. O'Caml is is derived from another ML, Caml, but with an object system added on. Caml has a few slightly different semantics and syntax than SML, and a few major differences (such as the lack of eqtypes), but on the whole it's rather similar. There are others, such as Poly/ML, but I haven't any experience with them, so I can't really comment on them.
Jeremy
file13
05-30-2002, 05:52 PM
here ya go:
http://caml.inria.fr/FAQ/FAQ_DEBUTANT-eng.html
and
http://caml.inria.fr/FAQ/FAQ_EXPERT-eng.html
basically CAML is a dialect of ML. Objective CAML is an extension to CAML (an ML dialect) and it is the only ML dialect that supports OOP (thus Objective).
but like Scheme is to Lisp, Ocaml is a dialect of standard ML. it's still got all the functional constructs, strong typing, type inferring....
to see examples of the 2 languages check out:
http://www.ps.uni-sb.de/~rossberg/SMLvsOcaml.html
or the working google cache:
(i can't get the URL to post correctly. but you can get the cache here:
http://www.google.com/search?q=Ocaml+and+Standard+ML
first link)
jemfinch
05-30-2002, 06:18 PM
Originally posted by file13
basically CAML is a dialect of ML. Objective CAML is an extension to CAML (an ML dialect) and it is the only ML dialect that supports OOP (thus Objective).
O'Caml isn't a dialect of SML; SML and O'Caml are both dialects of the family of languages known as ML, just as Scheme isn't a dialect of Common Lisp, Scheme and Common Lisp are both dialects of the family of languages known as Lisp.
O'Caml isn't the only ML to support OOP, it's simply the only one to offer class-based OOP. OOP can be done in many ways, only one of which is with classes. Personally, I'm not a fan of classes in O'Caml, though I recognize that they add some flexibility that other MLs don't have.
Jeremy
file13
05-30-2002, 06:39 PM
Originally posted by jemfinch
O'Caml isn't a dialect of SML; SML and O'Caml are both dialects of the family of languages known as ML, just as Scheme isn't a dialect of Common Lisp, Scheme and Common Lisp are both dialects of the family of languages known as Lisp.
O'Caml isn't the only ML to support OOP, it's simply the only one to offer class-based OOP. OOP can be done in many ways, only one of which is with classes. Personally, I'm not a fan of classes in O'Caml, though I recognize that they add some flexibility that other MLs don't have.
Jeremy
i never said it was a dialect of SML. i said CAML was a dialect of ML and Objective CAML is an extension to CAML. i obviously did however imply that SML was the main ML so i see why you're saying that.
also:
http://www.faqs.org/faqs/meta-lang-faq/
OBJECTIVE CAML...
This is arguably the
first publically available object-oriented language featuring ML-style
type reconstruction.
but it does not mention another ML language that does support OOP. if i'm wrong please let me know. :) (i very well could be)
but i don't know another ML language that supports OOP. in fact one could argue Ocaml dosen't full support OOP because it dosen't support dynamic polymorphism. but that's another story..... ;)
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.