Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's like Haskell, with a slightly heavier syntax. And it's eager. And you can unsafePerformIO all over the place (but avoid doing so even in Ocaml).

    (* Ocaml *)    --Haskell
    let foo = 42   foo = 42    -- top level declaration
    type bar =     data bar =  -- type declaration
Also, records in Ocaml are a separate kind of type, more like C structs:

    type bar = { x:int;     (* defination *)
                 y:float;
               }
    bar.x                   (* "member" acces *)

"Message passing" and "Method calling" are strictly equivalent, at least when everything is synchronous.


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

Search: