3 ms·
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 py
by nikofeyn 8y ago
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.
- vram11 8y ago>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?
- pjmlp 8y agoJust the very facts that they compile to native code, use type inference, pattern matching does it.
- vram22 8y agoThanks.
- ernst_klim 8y agoDecently 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.
- vram22 8y agoThanks.
- nikofeyn 8y agowell 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.
- nv-vn 8y agoIt'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).
- nikofeyn 8y agoyes, 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.