Live data from Hacker News

Why I love OCaml (2023)

mccd.space

71–80 of 313 posts

Re: Why I love OCaml (2023)

#71
post #51

Elixir 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)

#72
post #68
post #51

Elixir 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…

If it's functional (recursion vs imperative loops) most people/organizations will not use it. At this point that is just the reality.

Having loops is not the defining feature that separates functional from imperative. Where did this idea come from? I'm suddenly seeing it in a lot of places.

Re: Why I love OCaml (2023)

#73

Earlier quoted context omitted.

> PL theory group I know there are great many Polish people in the world, but why it matters so much in this case? They could have been any nationality, even French!

I believe many people use PL to mean programming language. I'm wondering if your joke just wooshed me.

You believe I'd purposefully misread an abbreviation in a comment about misreading abbreviations, and also coincidentally tried to make fun of two other nationalities (maybe even three, depending on political views), all at the same time?

I would never.

Re: Why I love OCaml (2023)

#74

Earlier quoted context omitted.

> PL theory group I know there are great many Polish people in the world, but why it matters so much in this case? They could have been any nationality, even French!

I believe many people use PL to mean programming language. I'm wondering if your joke just wooshed me.

I mean pohl's joke above whooshed kjmh so it's all fine. The important thing for threads like this one is for us to name drop all of the weird programming languages that we have used, publicly avow the greatness of ones that we have not, and make a New Year's resolution that we will never follow, to actually pick up those great languages and write something in them...

Re: Why I love OCaml (2023)

#75

Earlier quoted context omitted.

Gleam also. But i cant justify a non compiled language in many things i do.

gleam is compiled... to erlang bytecode

It's compiled to Erlang, not BEAM bytecode, as the latter is not a stable, backward-compatible API to target, and you lose all of the optimization work put into the Erlang compiler. It's also compiled to JavaScript, so it can run on both the front-end and back-end.

Re: Why I love OCaml (2023)

#76
post #72
post #68

Earlier quoted context omitted.

If it's functional (recursion vs imperative loops) most people/organizations will not use it. At this point that is just the reality.

Having loops is not the defining feature that separates functional from imperative. Where did this idea come from? I'm suddenly seeing it in a lot of places.

its a simplification of immutability and its consequences

Re: Why I love OCaml (2023)

#77
post #51

Elixir 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…

Writing OCaml and writing Elixir code is much different for me. OCaml requires more braincells, while Elixir is more flexible.

Re: Why I love OCaml (2023)

#79
post #50
post #44

Earlier quoted context omitted.

> Our hope is that these extensions can over time be contributed to upstream OCaml. Yeah, its more just extensions to support their use cases at scale. Think of it more as bleeding edge ocmal, once they work out kinks/concerns they'll get merged back into the language OR if it remains ultra specific it'll stay in oxcaml. Not a complete own version lol

Yes but the context of the thread is OCaml being "almost there". Having to build this stuff in-house is pretty good evidence.

I don’t know about that.

Python gets forked in other investment banks as well. I wouldn’t say that is evidence of any deficiencies, rather they just want to deal with their own idiosyncrasies.

See https://calpaterson.com/bank-python.html

Re: Why I love OCaml (2023)

#80
post #51

Elixir 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…

I think that a better question is why F# isn't a more popular language, since it's much closer to OCaml, than Elixir and you can use the whole Dotnet ecosystem in F#, which is one of the weakest points of OCaml (no libraries).
Post reply on HN