Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Try OCaml in Your Browser (ocamlpro.com)
13 points by kristianp on Dec 24, 2011 | hide | past | favorite | 4 comments


Other than a novel syntax, what are the advantages of using OCaml over python, perl, or ruby?


1) 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.


Got 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.


Just 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?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: