4 ms·
Other than a novel syntax, what are the advantages of using OCaml over python, perl, or ruby?
by christiangenco 15y ago
Other than a novel syntax, what are the advantages of using OCaml over python, perl, or ruby?
- thelema314 15y ago1) Strict yet expressive typing. Find errors at compile time rather than runtime, while still allowing a very flexible set of values to be described. (tuples, sets, lists, hashtables, maps, arrays, records, objects, etc.) 2) Efficiency. Python, perl, ruby are all... slow. OCaml compiles to very efficient native code. Xavier Leroy's accomplishment is a high level language that's within 2x the speed of C.
- christiangenco 15y agoGot it. 2x the speed of C is very interesting... this could come in handy the next time I need to write a physics/math computation script.
- swah 15y agoJust having a nice way to define datatypes is already a big win against dynamic languages: type tree = Empty | Leaf of int | Node of tree * tree What I would like to know is: could it have Python's community/libraries, or the language itself somehow prevents this blossoming from happening?