OCaml features: a static type system, type inference, parametric polymorphism, tail recursion, pattern matching, first class lexical closures, functors (parametric modules), exception handling, and incremental generational automatic garbage collection.
Ocaml compiles and runs fast but has ugly syntax compared to Haskell.
That's the main reason why it fails.
Another is that it has a small community, and they're mostly French.
Name:
Anonymous2007-07-21 4:41 ID:56erBxHb
Ocaml is designed by people who wouldn't know "clean" or "consistent" if it raped them in a back alley.
In my case, what broke the camel's back was a global namespace for all records within a module. For those of you not familiar with the terminology, think of being unable to have the same name inside two different structs. Those of you who've ever done 3D (a.x, a.y, a.z!) will be screaming about now.
I can rant and rave all day about all the stupidities in Ocaml, but it's not going to be fixed. Look elsewhere unless you'd like a death by a thousand cuts.
>>9
You just used “incorrect” double quotation marks. Double quotation marks are indicated by ‘“’ and ‘”’, not by two grave accents ‘``’ and two apostrophes ‘''’. Please remember this.
Name:
Anonymous2007-07-21 9:18 ID:tfNdUpBi
>>11 not by two grave accents ‘``’ and two apostrophes ‘''’
They are in TeX.
>>16
I'm gradually realising there are a lot of people in here who have never seen that language.
Name:
Anonymous2007-07-21 21:16 ID:nWiyBvQ1
>>16
No, I was trolling, but what's with struct? It's most commonly seen in C, but how's that related to this thread? Or is it just your way to say "I've read K&R"?
Name:
Anonymous2007-07-21 22:03 ID:1WF9MypZ
>>18
dude, it has nothing to do with static vs. dynamic. use your head a little bit. If >>5 mentioned structs, which are in C, which is not a dynamic language, then how the fuck do you reached that conclusion?
Name:
Anonymous2007-07-21 22:28 ID:nWiyBvQ1
20GET
Name:
Anonymous2007-07-21 22:38 ID:dArJ/JzN
>>18,20
That's all you have to say? Defend your honour, if you have any.
Ocaml has really clean syntax for a statically typed language. It is very clear what is going on the type system helps in debugging. Anyone here is commenting on the superficial and they even get that wrong
let f x = x *. x
let sqr_list l = List.map f l
let sqr_list l = List.map (fun x -> x *. x) l
let rec sqr_list = function
[] -> []
| x::xs -> ( x *. x ) :: sqr_list xs
let sqr_list l =
let ol = ref [] in
List.iter (fun x ->
ol := x :: !ol
) l
List.rev ol
let sqr_list l =
let ol = ref [] in
let len = length l in
for i = 0 to (len - 1) do
ol := (List.nth l (len - 1 - i)) :: !ol
done
ol
;;
So whatever. It all works and you can do the same thing multiple ways in multiple paradigms.
Name:
Anonymous2007-07-22 20:39 ID:2/9FIl0v
Anyone here is commenting on the superficial and they even get that wrong
Until they fix that record issue, I'm not touching it again. That's beyond braindead.
Name:
Anonymous2007-07-22 22:02 ID:YckDbpi2
what is the record issue? The shared namespace? The mutable attributes?
Name:
Anonymous2007-07-22 22:29 ID:vhhuNwz6
"quotes``
Name:
Anonymous2007-07-22 22:30 ID:vhhuNwz6
''quotes``
Name:
Anonymous2007-07-22 22:36 ID:2/9FIl0v
>>32
Fields in different records in the same file cannot have the same name, yes.