Hacker News new | comments | show | ask | jobs | submit login

it is truly amazing to me that an ML language never made it mainstream. an OOP-enabled ML like F# or Ocaml beats the pants off of the likes of something like python, but here we are where python is taking over the world. and everyone else is clinging to java and c++.

f# and ocaml aren’t even hard to learn! i mean, one can learn Standard ML in a couple of weeks using dan grossman’s programming languages course! i understand, f# and sml and even some scala after just some small reading. but i took a semester long course in c++ and never understood it.

>an OOP-enabled ML like F# or Ocaml beats the pants off of the likes of something like python

Can you explain why you think so?

Decently typed, fast (immensely faster then python), the languages are based on a concise and sound theory and most of newly added features are just sugar over this concepts (like objects and polymorphic variants are just a products of subtyping feature in ocaml), unlike python, where features are monkey patches.


well python is often loved for how clean it is. however, i believe f# (or any ml dialect) is much cleaner than python in terms of syntax. and not only is it cleaner, it is more consistent, which is due to its ml ancestry. python is often loved for how it allows people to express solutions to their problems. however, f# allows much more expression that python has explicitly chosen to disallow. for example, f# is every bit as capable if not more capable as an oop language than python (see .net generics and ecosystem), but it also has functional programming features. if you have never programmed in a language with discriminated unions and pattern patching, you really should try. just look at people implementing ideas and compilers in f#, ocaml, or sml. using pattern matching and union types, it almost looks trivial. it looks as those they're just writing out a description of what they're trying to solve, and then bam, it's done. and i like f# out of these because of the .net platform and how it has embraced its multi-paradigm nature in a very graceful way.

python is a very pedestrian language. that is probably the secret to its popularity. it makes people who have put no study into programming languages feel great because they're able to accomplish things quickly, at least at the start. however, they are missing a lot, in my opinion by sticking with python. there is nothing, from my perspective, that python has that f# doesn't or couldn't have. and the reverse of that is explicitly not true.

ml and lisp/scheme are two of the greatest programming language approaches and paradigms, and python chose and continues to choose to ignore both of them.

It's always been funny to me as a functional programmer that Python took off. People always talk about how much quicker it is to write code in Python, and 99% of the time I find the Python code to be more complex than the OCaml/Scheme/Haskell/Common Lisp equivalents (minus, of course, the library support).

yes, it's really sad. i feel like the ML and lisp dialects are all we ever needed. having these two languages allows so much. they're perfect for getting stuff done and they're perfect for creating new languages. there's no reason why they couldn't have been used to perform the roles of things like java or c++ or python, but yet, here we are.

Yeah, that is my though since I used Caml Light in the university, quite a while ago.

Specially since adding to what you mentioned, those languages were compiled since the early days.

It all boils down to lack of love from OS vendors.

Even nowadays, F# is still the black swan of .NET languages, with less tooling support that C++ gets.

So I came to appreciate the small additions we get in Java, C#, C++ to get closer to FP kind of programming than expecting a radical change.

Thanks for the reply. Good points to check out.

no problem. i saw on this account’s summary that you do pdf generation. there are two good books on ocaml, and the second, more ocaml, has a project on producing pdf files. so that seems like it may be of interest to you.



Cool, thanks, will check it out.

Just the very facts that they compile to native code, use type inference, pattern matching does it.


Applications are open for YC Winter 2019

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