Earlier quoted context omitted.
No, it is doing its own package management implementation.
So dune is going to replace opam? Where can I read more about this if so?
OCaml as my primary language
161–170 of 296 posts
Re: OCaml as my primary language
#162I tried to like OCaml for a few years. The things that hold me back the most are niggling things that are largely solved in more "modern" langs, the biggest being the inability to "print" arbitrary objects. There are ppx things that can automatically derive "to string" functions, but it's a bit of effort to set up, it's not as nice to use as what's available in Rust, and it can't handle things like Set and Map types…
Python does it best from what I've seen so far, with its __repr__ method.
Re: OCaml as my primary language
#163I saw a talk by someone from Google about their experiences using Rust in the Android team. Two points stuck out: they migrated many projects from Python, so performance can't have been that much of a concern, and in their surveys the features people liked most were basics like pattern matching and ADTs. My conclusion is that for a lot of tasks the benefit from Rust came from ML cicra 1990, not lifetimes etc. I feel…
Re: OCaml as my primary language
#164Earlier quoted context omitted.
In 2010, Ada 2005 was the most bare-metal-worthy expressive language. Now that would be Ada 2022.
While at it: what was / is holding Ada back? I haven't seen a single open-source project built in Ada, nor did I hear about any closed-source corporate project that uses Ada's superpowers. (Most likely these exist! But I did not see any available, or at least well-publicized.) People agree to go to great lengths to use a tool that has some kind of superpower, despite syntactic weirdness or tooling deficiencies. Peopl…
Re: OCaml as my primary language
#165Earlier quoted context omitted.
I'd say that Google strives to have a reasonably short list of languages approved for production-touching code. Rust can replace / complement C++, while OCaml cannot (it could replace Go instead... fat chance!). So I suspect that the team picked Rust because it was the only blessed language with ADTs, not because they won't like something with faster compile times. No way OCaml could have stolen the Rust's thunder: w…
Wouldn’t Kotlin be a more reasonable choice in that case? It has ADTs and a lot of the same niceties of Rust.
Re: OCaml as my primary language
#166Earlier quoted context omitted.
Scala was always going to be hamstrung by the fact that it's a JVM language and yes, the crazy stuff people did with the language didn't help.
I agree w that, but I think Scala has deeper problems. It tries to be a better Java and a better OCaml at the same time. This split personality led to Scala’s many dialects, which made it notorious for being difficult to read and reason about, particularly as a mainstream language contender. Above all, Scala is considered a functional language with imperative OOP qualities. And it more or less fits that description.…
Re: OCaml as my primary language
#167Earlier quoted context omitted.
This is one of the wilder conspiracy theories to me, and that says a lot in 2025.
The RESF is not a conspiracy theory, its a known thing. Especially on HN: https://news.ycombinator.com/item?id=14178950
Re: OCaml as my primary language
#168Earlier quoted context omitted.
It's real, and as someone who loves rust, it's embarrassing, and difficult to avoid. The OSS embedded rust users in particular are nuts.
Really appreciate a fairminded Rust person chiming in. It's a disservice to the language (which is cool!), and it makes the community look bad. Rust might gain some adoption among people who are new to high performance software and see a narrative that its the only game in town, but it turns off a lot of older folks like myself who know it isn't and that community matters. gl to you and people like you trying to get…
Rust is an exciting language. It comes up because many people like it.
Re: OCaml as my primary language
#169I saw a talk by someone from Google about their experiences using Rust in the Android team. Two points stuck out: they migrated many projects from Python, so performance can't have been that much of a concern, and in their surveys the features people liked most were basics like pattern matching and ADTs. My conclusion is that for a lot of tasks the benefit from Rust came from ML cicra 1990, not lifetimes etc. I feel…
doesnt rust still have the advantage of having no gc? I dont like writing rust, but the selling point of being able to write performative code with memory safety guarantees has always stuck with me
OCaml's GC design is a pretty simple one: two heaps, one for short-lived objects and another one for the long-lived objects, and it is a generational and mostly non-moving design. Another thing that helps tremendously is the fact that OCaml is a functional programming language[1], which means that, since values are never mutated, most GC objects are short or very short-lived and never hit the other heap reserved for the long-lived objects, and the short-lived objects perish often and do so quickly.
So, to recap, OCaml’s GC is tuned for simplicity, predictable short pauses, and easy interoperability, whereas Java’s GC is tuned for maximum throughput and large-scale heap management with sophisticated concurrency and compaction.
[0] Maybe it still is – I am not sure.
[1] It is actually a multiparadigm design, although most code written in OCaml is functional in its style.
Re: OCaml as my primary language
#170Earlier quoted context omitted.
I would say ReasonML also needed more follow-through. It seems like the OCaml community hasn't really rallied behind it.
Maybe it's good it died? Now we have moonbit lang.
(They are the same language)
Reason at least was an active collaboration between several projects in the OCaml space with some feedback into OCaml proper (even though there was a lot of initial resistance IIRC).