August 24th, 2006, 05:31 PM
Why learn OCaml?
I just got some book about OCaml (800 pages). Is it worth learning OCaml? What are its main advantages?
August 26th, 2006, 01:23 PM
Anyone heard for Ocaml?
August 26th, 2006, 03:00 PM
It'll teach you more about programming from an academic point of view which should make you a better programmer in ordinary languages. The same goes for lisp and haskell. Mozart/Oz is another worth looking at
August 26th, 2006, 03:24 PM
Thanks for reply, LP.
I'll take a look at OCaml when i have more time. I'm currently busy with learning PHP/MySQL.
I googled for Mozart/Oz. It's for "Folding@home" type of applications.
EDIT: i just noticed that Firefox spell checker marks word googled as invalid. W00T!
August 26th, 2006, 03:54 PM
I forgot to add smalltalk (pure OOP) to the list. And io (crippled, but ruby and lisp inspired), and erlang (very good networking). These are all languages I want to look at when I get time so I can improve my skills in other languages.
Programming is a wonderful thing.
Comments on this post
August 26th, 2006, 03:58 PM
What do you think about Scheme? I saw it few years ago somewhere. It has weird way of defining functions.
August 26th, 2006, 04:45 PM
Scheme is a lisp. see above.
August 30th, 2006, 11:30 AM
OCaml isn't just worth learning because it'll give you a new perspective, that would be selling the language short. OCaml has been around long enough for it to become very fast, complete and capable language .
For the record OCaml has never really been an academic language (though it's ancestors historically were).
I know of at least 6 people in passing using OCaml on a daily basis, for real world applications that would normally have been written in C or C++.
The advantages of using OCaml in place here are obvious to anyone who's looked at the languages but for those who haven't:
OCaml combines OO and functional programming seamlessly in a (strange) but clear syntax. Along with automatic memory management and excellent bindings (OpenGL for one) this makes OCaml a great language for rapid turn around.
In typical ML style OCaml allows the creation of very modular programs with optional type declaration (though this isn't required, the compiler will figure out the types at compile time using 'type inference').
For the mathematically inclined ML is also worth playing with, since it has a very nice numeric stack (though personally I prefer Scheme for this).
OCaml isn't an industry standard and this tends to make people a little nervous about it, or worse overlook it - especially if they're interested in one thing, getting work. I think this is a bad idea .
In reality the ML family of languages are amazingly clear and widely regarded as close to perfect for mission critical systems - being good for writing programs which must be correct!
I'm not claiming to be an expert in *ML but I would take some time to learn it. I myself am slowly learning it's sister language SML with great enjoyment.
Please don't take my choice to mean that SML is better than OCaml. I looked at OCaml before SML but at the time I wanted to explore more functional programming rather than OO.
I don't see how Io is a "crippled" version of Lisp and Smalltalk. Care to explain?
The only thing bad things about Io IME, would be that it's very new and doesn't yet have much in the way of documentation or community, it's run speed and certain annoying inconsistencies.
These last two can be ignored by virtue of the fact that Io runs as fast as the popular set of dynamic languages, and all of these languages have a number inconsistencies.
Anyway time to get some sleep.
Take care guys,
* Perl, Python, Ruby ...
August 30th, 2006, 01:40 PM
Nice post as always, netytan. I wanted to learn OCaml only to get new perspective. I already have many experience with C#, and it will be my primary language (for desktop applications) for many years. For me, C# has most beautiful syntax of all languages. Probably because i used to spend many hours typing it...
So, i don't see get any advantages if i use OCaml. And it can't be faster than C#.
And, C# has good modularity for most projects. OCaml is for extreme cases...
- This is interesting, btw: http://www.ocaml-tutorial.org/ocaml_and_the_web
August 30th, 2006, 02:38 PM
It can be and is faster than c#.
There, are we all happier now?
August 30th, 2006, 02:41 PM
WTF? Faster that C#?!
Can you prove that? It's strange.
August 30th, 2006, 02:49 PM
I'm just trolling, although I'd be surprised if it were much slower.
Originally Posted by °Oblivion°King°
August 30th, 2006, 02:51 PM
You scared S.h.i.t out of me, LP...
BTW, QBasic is more flexible that Perl.
August 30th, 2006, 02:59 PM
Yeah, I've seen this a lot in qbasic
[hl=vb]Private Sub Closure
Return Inline Sub (x as int)
x = x + 1
August 30th, 2006, 03:01 PM
You should go to brainwashing to forget VB...
It'll help you a lot.