OCaml’s REPL is lovely, but I found myself having some friction with initial startup. The build/package system was pretty convoluted, and I ended up choosing JS’s Core stdlib for my needs (a simple compiler). With the new multicore release it’d be cool to see OCaml in some more practical projects!
Why I love OCaml (2023)
81–90 of 313 posts
Re: Why I love OCaml (2023)
#82Elixir is the closest thing to OCaml that has a chance at semi-mainstream usage IMO. It has basically all of the stuff about functional programming that makes it easier to reason about your code & get work done - immutability, pattern matching, actors, etc. But without monads or a complicated type system that would give it a higher barrier to entry. And of course it's built on top of the Erlang BEAM runtime, which ha…
immutability? Interactive Elixir (1.19.0) - press Ctrl+C to exit (type h() ENTER for help) iex(1)> x = 1 1 iex(2)> x = 2 2 iex(3)> What's immutable about elixir? It's one of the things which I MISS from Erlang -- immutability.
Data is immutable and thats much more important than whether local variables can be modified imo.
Re: Why I love OCaml (2023)
#83Earlier quoted context omitted.
Perhaps OCaml is the Velvet Underground of languages. Only a few thousand people learned OCaml but every one made a programming language[1] [1]: https://quoteinvestigator.com/2016/03/01/velvet/
That would be Elm :)
Re: Why I love OCaml (2023)
#84To this day, whenever I see Machine Learning abbreviated, my heart skips a beat, then I become crestfallen as I realize I'm not about to read something about Meta Language.
I'd rather have that issue than seeing "AI" plastered all over the place. I'm of the opinion AI should be reserved for artificial general intelligence. These things aren't intelligent yet. They're just em-bloat-ified traditional machine learning techniques. Not that they're useless. I just hate the terminology. If people start using the term AI, we better be living in I, Robot. Not whatever the hell this is. Tangenti…
Re: Why I love OCaml (2023)
#85There's some other stuff, but I personally believe if the tooling was closer to Rust/Go than C, it would be a lot, lot more popular. Nobody wants to effectively learn a lisp to configure a build system.
Re: Why I love OCaml (2023)
#86Re: Why I love OCaml (2023)
#87Re: Why I love OCaml (2023)
#88Earlier quoted context omitted.
Almost there, but in the meantime supporting a casual squillion dollars of trades at JS
Unless you're building another JS, it'd be nice if there were other companies so heavily invested in it. There's a lot out there beyond compiler prototypes and high speed financial trades, but there's not enough talk of people using ocaml for those things.
So that does seem to be a good use-case for the language.
Re: Why I love OCaml (2023)
#89Elixir is the closest thing to OCaml that has a chance at semi-mainstream usage IMO. It has basically all of the stuff about functional programming that makes it easier to reason about your code & get work done - immutability, pattern matching, actors, etc. But without monads or a complicated type system that would give it a higher barrier to entry. And of course it's built on top of the Erlang BEAM runtime, which ha…
immutability? Interactive Elixir (1.19.0) - press Ctrl+C to exit (type h() ENTER for help) iex(1)> x = 1 1 iex(2)> x = 2 2 iex(3)> What's immutable about elixir? It's one of the things which I MISS from Erlang -- immutability.
Re: Why I love OCaml (2023)
#90>why isn’t OCaml more popular? OCaml did become popular, but via Rust, which took the best parts of OCaml and made the language more imperative feeling. That's what OCaml was missing!
It has no dogmatic inclination towards functional. It has a very pragmatic approach to mutation.