Live data from Hacker News

Why We Use OCaml

tech.esper.com

141–144 of 144 posts

Re: Why We Use OCaml

#141
post #133

Earlier quoted context omitted.

Oh. Ocaml again. Well, I'll chirp on the opposite side of discusion. The syntax is completely :%^&#$^ $% %^&*% up. Unreadable. Yes, it maybe somewhat pleasant to write code in such syntax, but readability sucks. Just like perl. Also ugly as perl as well. When do you people learn the lessons from C, Python and Haskell? That _readability_ is _the most important thing_ for any language. Now about design. Ocaml allows a…

> Oh. Ocaml again. Nothing forces you to read the posts you don't like. > Well, I'll chirp on the opposite side of discusion. The syntax is completely :%^&#$^ $% %^&*% up. Unreadable. Yes, it maybe somewhat pleasant to write code in such syntax, but readability sucks. Readability is mostly a matter of experience. > Which means that there are uncountably many ways to screw up the design And many ways to make it fit a…

>> Readability is mostly a matter of experience.

"It is totaly bogus claim." A single example of Perl, Brainfuck or Ocaml can prove that you are wrong. "The only people that can't read their own Perl after 6 months are the people that don't really know Perl." "Replace "perl" with "APL" or "BrainFuck" (or any language with baroque syntax) and the above sentence is as (in)valid."

Re: Why We Use OCaml

#142
post #54

Earlier quoted context omitted.

One more thing: OCaml is strict by default, Haskell is lazy by default. The later allows for some nice code idioms[0], but makes reasoning about performance and memory characteristics very difficult[1]. [0] indexedList :: [a] -> [(Integer,a)] indexedList l = zip [1..] l [1] http://www.reddit.com/r/haskell/comments/15h6tz/what_isnt_ha... http://www.haskell.org/pipermail/haskell-cafe/2013-September... http://stackoverf…

Or even: indexedList = zip [1..] Love how ML-like languages let you express just the bare essence of an operation.

Yea, I didn't do that just to make it clearer: if you aren't used to ML, I Imagine that this would be very confusing.

Re: Why We Use OCaml

#143

Earlier quoted context omitted.

20 years for language X do not bring the same amount of benefits as 20 years for language Y, as can be clearly seen if we compare Javascript and OCaml.

Not sure which language looks better here... I'd say that even with its greater popularity, JavaScript is worse in pretty much every aspect than OCaml.

Yes, I meant OCaml looks better, in light of all the javascript traps.

Re: Why We Use OCaml

#144
post #92

Earlier quoted context omitted.

Hey Jon, being an F# user who is not very familiar with OCAML, I'd love to know a little more about what specifically F# lacks that makes OCAML superior. I want to know what I'm missing out on.

Where Ocaml is better : - Single Core Speed (Ocaml is fast) - native compilation without requiring some installed runtime - Polymorphic Variants (Last I read, to be used only when regular variants are not sufficient) - Modules and Functors (there's a proof of principle for F# supporting these) - GADTs (allow for richer more expressive types, much more flexibility than regular algebraic data types) - camlp4 - more per…

Thanks for the great comparison! Just want to note that OCaml's GADT stuff is really great, but you can even do a final encoding of GADTs if all you have is signatures and structures (as in SML). I'm not familiar enough with F# to say—is this also possible in F#?
Post reply on HN