5 ms·
Its unfortunate the cleaned up syntax never took off, and that OCaml dropped the ball on multicore for over a decade. If OCaml had decent multicore around 2010
by noelwelsh 1y ago
Its unfortunate the cleaned up syntax never took off, and that OCaml dropped the ball on multicore for over a decade. If OCaml had decent multicore around 2010 or so the current programming language langscape could look very different.
- behnamoh 1y ago> Its unfortunate the cleaned up syntax never took off, and that OCaml dropped the ball on multicore for over a decade. It just shows the mindset of its devs was a little behind the realities of the industry, or they simply didn't care about concurrency. In comparison, I like how Python always tries to be on top of things by exploring new PEPs.
- toolslive 1y agoI'm going to be sarcastic _and_ on topic (you baited me): yeah, like how python completely solved concurrency & parallelism.
- sidkshatriya 1y ago> It just shows the mindset of its devs was a little behind the realities of the industry, or they simply didn't care about concurrency. OCaml cared about concurrency (e.g. Lwt, Async are old libraries that provide concurrency -- they didn't need multicore Ocaml). OCaml didn't care so much about true _parallelism_ in threads until recently. Parallelism was to be obtained via processes and not threads in pre OCaml 5.0. True parallelism in threads is available in OCaml >= 5.0 Python is actually trying to go multicore too ! OCaml however beat it to the punch. The strengths of Python are elsewhere though, a topic for another day.
- jimbokun 1y ago> Python is actually trying to go multicore too ! OCaml however beat it to the punch. This is debating the relative finishing places of the two runners finishing last in the marathon after most of the other runners have already gone home and had their dinner.
- neonsunset 1y agoIf you care about efficient parallelism, F# might give you much better experience and results.
- jimbokun 1y agoAs well as many, many other programming languages!
- deleted 1y ago[deleted]
- ackfoobar 1y agoTo be pedantic, concurrency in OCaml has been fine with lwt. Single threaded concurrency, not unlike how JS does it.
- abathologist 1y agoOCaml has had great concurrency support for years and years. Multicore is only a question of shared memory parallelism.
- giraffe_lady 1y agoYeah though iirc they did have to rewrite the runtime to get multicore so who knows what sort of tradeoffs they'd have had to make to have had it be like that from the beginning. A lot of what made it good (to the extent it was) in the 2000s was you got a very sophisticated type & module system and a fast compiler without giving up any runtime performance compared to its peers. I don't know if that would have been achievable with its dev resources alongside multicore early. I don't know that it wouldn't either though. Just a big what if all round. I suspect a larger or at least comparable limitation was essentially pretending windows didn't exist for uh like thirty years. If you knew what you were doing you could cross compile for it but it was not easy. Getting a dev environment running on windows was basically impossible until like five years ago. The syntax idk I don't have strong feelings about it. I initially recoiled like everyone else of course, but to me style and naming conventions are almost as important and on that front ocaml's are also among the worst in the world lol. Once you get used to it it's kind of endearing how fucked up it is.
- toolslive 1y ago> ... with its dev resources ... Opening a pull request to the compiler or std lib was also treated with some French love. (I never bothered to open one again after that)
- suspended_state 1y agoWho are you quoting here?
- toolslive 1y agothe quote is the part between the dots; my comment is about why the number of developer resources might limited.
- suspended_state 1y ago> the quote is the part between the dots; my comment is about why the number of developer resources might limited. Very confusing. On HN, it's customary to follow the email-style convention of using the '>' symbol for quotes and placing them on separate lines.
- StopDisinfo910 1y agoPython had no multicore during the same period and that never prevented it from becoming successful. Plus, Ocaml always had descent solution for concurrent I/O. The absence of multicore is a complete red herring in why Ocaml isn't more successful. Ocaml issue never was the syntax which is completely fine. The current syntax is actually a lot nicer that what Facebook proposed. Ocaml issue is not being a USA-born project nor having a significant marketing push in English. Plus, Ocaml always was too far ahead of its time (including now with its effect system). First, you have the functional approach which was already very unfamiliar for most. Then, you have to add module level programming on top which is still very unfamiliar to most. Just look at this comment page and people thinking Ocaml is not fun to use or less interesting than Haskell, it's trully sad. Multicore has added the extremely promising effect system but that's once again a step too far for most current developers. In a lof of way, Ocaml is to programming language what the Pixies are to rock music. Everyone who felt deeply in love with it went on to write a language of their own. Some got really successful.
- behnamoh 1y ago> Ocaml issue is not being a USA-born project nor having a significant marketing push in English. Python is a counter argument here.
- StopDisinfo910 1y agoIt's not. Van Rossum is Dutch but Python always had a strong marketing push in English. The first version was announced in English on Usenet. Van Rossum moved to the USA quite quickly to work on Python from CNRI in 1995. Then, it got funding from DARPA in 1999 with this as part of its pitch: "Create a code that is easy to understand and looks as easy as the English language." Ocaml meanwhile is an INRIA child made by a French team to develop another INRIA child made by another French team. I think in Europe, that's approximately as US hostile as you can be. Actually, Ocaml has only become somewhat popular since it's pushed a bit from the UK which I find amusing.
- kangda123 1y agoAs far as my experience, there's little code in Python that I would like to replace with OCaml. Python stuff is research code and small services that were written hastily. I would love to replace my Go code with OCaml. It was always kind of on the verge though. On one hand, once you use a proper type system, you cannot look at Go. On the other, Go's multicore is just so much better than Async/Lwt. In terms of programming, in terms of debuggability, surely in terms of performance too. Having proper multithreading in 5.0 suddenly makes OCaml strictly superior in my (rather biased) opinion.