Live data from Hacker News

The road to OCaml 5.0

discuss.ocaml.org

51–60 of 118 posts

Re: The road to OCaml 5.0

#51
I write a lot of Scala for living, Ocaml looks a bit outdated to me. Having said that, Ocaml compiler is one of the greatest miracles in PL when it comes to speed vs complexity of the language. Scala/Haskell/TS are not even close. I hear Ocaml's runtime performance is not too shabby either

Re: The road to OCaml 5.0

#52
I really wanted to like OCaml, still do. I gave it a good shot a couple of years ago, wrote a few basic programs and loved it.

But it to me seemed packaged like many languages in the days of yore, when a language shipped simply as a compiler, and nothing more. The way of the world today to me seems to be a compiler, together with a complete standard library and consistent packaging system.

My experience with OCaml was thwarted repeatedly by a byzantine exploration process of packages depending on other packages, which required other packaging systems. Once I reached that point where it felt like I was spending more time figuring out the complex ecosystem, rather than writing code, I rapidly lost interest.

And perhaps such a point comes in exploring any new language. But it came much too early for me in OCaml. I had so much more I wanted to learn, but couldn't. I am hopeful for the new release. Thank you for your efforts, OCaml team.

Re: The road to OCaml 5.0

#53

I write a lot of Scala for living, Ocaml looks a bit outdated to me. Having said that, Ocaml compiler is one of the greatest miracles in PL when it comes to speed vs complexity of the language. Scala/Haskell/TS are not even close. I hear Ocaml's runtime performance is not too shabby either

Out of curiosity, what problems does Haskell's compiler(s) (I think it's really just GHC these days?) face that OCaml's doesn't?

Re: The road to OCaml 5.0

#54

I write a lot of Scala for living, Ocaml looks a bit outdated to me. Having said that, Ocaml compiler is one of the greatest miracles in PL when it comes to speed vs complexity of the language. Scala/Haskell/TS are not even close. I hear Ocaml's runtime performance is not too shabby either

Out of curiosity, what problems does Haskell's compiler(s) (I think it's really just GHC these days?) face that OCaml's doesn't?

speed. Ocaml compiler is probably as fast as Go one

Re: The road to OCaml 5.0

#55

I really hope to see more interest in OCaml in the future. It is probably one of the most underrated programming languages. The perfect marriage between state of the art functional programming and pragmatism. A great static and strong type system. Solid performance and an insanely fast compiler. Also compiles to JS if you need that. Multicore support will make it quite perfect. Only thing that is holding it back more…

multicore ocaml won't change adoption of the language in any significant way

Re: The road to OCaml 5.0

#56

Earlier quoted context omitted.

If they can also ship algebraic effects (and even better, typed algebraic effects), then I think it will push the language back firmly into "state of the art". This will mean it continues to get the attention it deserves. I'm excited about algebraic effects, I think they are much more intuitive than monads (and don't require code to be rewritten).

The current plan is to have runtime support for effects in 5.0, but without a syntax nor an effect type system. Those two will come later in the 5.x branch. The aim is to decouple the switch to the multicore runtime from the design of the typed effect system. In the interim period, effect handlers would be exposed through an experimental module (exposed through an experimental module (see https://discuss.ocaml.org/t/…

Exciting stuff! Keep up the good work!

Re: The road to OCaml 5.0

#57

I really hope to see more interest in OCaml in the future. It is probably one of the most underrated programming languages. The perfect marriage between state of the art functional programming and pragmatism. A great static and strong type system. Solid performance and an insanely fast compiler. Also compiles to JS if you need that. Multicore support will make it quite perfect. Only thing that is holding it back more…

> Only thing that is holding it back more than that and the reason I have not done many projects with it, is it weirdly fragmented ecosystem.

I wonder if that's precisely why people use it. I've been thinking about it, and I think people using OCaml value independence a lot. That's something that doesn't help building a community, since communities often thrive on consensus. As an example of that in the linked thread: Yaron Minsky's second comment about Flambda 2, which I'll copy here:

> And, I should add: Jane Street’s intent to upstream our work is not the same as upstream’s intent to accept it. None of what I’ve said is an announcement on behalf of the core OCaml team, nor am I in any position to make such an announcement!

This comment, to me, speaks volumes in terms of respect for the independence of the OCaml team. And independence seems to be something Jane Street values a lot too. They have lots of libraries that they freely share with other people. If you want to use, in a way, their "flavor of OCaml", you're free to do so. And if you don't want to, you're free to do something else.

You can see the same thing with JSOO, ReasonML/Reason/ReScript and now Melange. You're free to pick what you want. Same thing with the multicore. You want to use it? Great! You don't want to? They are working hard to make sure your code will still work and won't suffer too much performance regressions.

It may be a bit weird if you're used to other communities, I know I took a long time to understand why things are this way, and I may still be completely wrong. But I think the angle of valuing independence explains a lot, and is also a good way to know if it's a language and ecosystem for you or not.

Another thing that may not help: the book "Le langage Caml" is a great introduction to the language and programming, but sadly it's not translated.

Re: The road to OCaml 5.0

#58

Earlier quoted context omitted.

Have you looked into Julia, Nim, Clojure, or even Common Lisp? I'm not sure bout Python interop with CL, but Nim and Clojure seems to have some kind of beta-grade interop, and there's a solid interop story in Julia. And all of those languages have some of their own "native" data analysis and scientific computing toolkits (Julia having more than "some", of course). That said, complicated Python systems can be improved…

Link to the interop lib for Clojure you're referring to for people who don't know it: https://github.com/clj-python/libpython-clj Really a remarkable feat of engineering. Here's its author giving a talk: https://www.youtube.com/watch?v=vQPW16_jixs

I was thinking of linking this as well. Clj-python is just such a fascinating junction. I don't care so much for clojure, though I'm continuously impressed by the ecosystem and the productivity of it's experts. Very cool stuff.

Core.logic and the like opened a huge door and similar ideas have exhausted my free time for several years now.

Re: The road to OCaml 5.0

#59

Earlier quoted context omitted.

If it were a total non starter than why would their entire company be using it?

Instagram has much lower latency requirements…

I believe they’re referring to the hedge fund. Lower latency requirement is a confusing way of phrasing it as lower latency is a higher bar. But generally most hedge funds do not need to operate at the speed Instagram does.

Re: The road to OCaml 5.0

#60

My favourite quote about OCaml: "Never have I took so long, to write so little code, that does so much" OCaml can be a big learning curve, but I urge you to push through. The syntax might not be everyone's cup of team, but you get used to it quickly.

I really wanted to settle on OCaml as the "real programming language" that I would learn for any "serious programming" I had to do. I couldn't make it stick (in part because I don't actually do any "serious programming") precisely because of the syntax.

There's too little of it! OCaml seems to take a "you don't need syntax except when you need syntax" approach, which I found very destabilizing. One of the major online OCaml tutorials said something like "If it doesn't work the way you expect, try adding parentheses", and I thought "Oh hell no. In a Lisp I know exactly how many parentheses I need: all of them". I prefer not having to think about it, and letting the parentheses become invisible to me.

But otherwise I have a deep and irrational fondness for the language, and still wish I'd been able to make it stick.

Post reply on HN