Ask Lemmy
A Fediverse community for open-ended, thought provoking questions
Rules: (interactive)
1) Be nice and; have fun
Doxxing, trolling, sealioning, racism, toxicity and dog-whistling are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them
2) All posts must end with a '?'
This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?
3) No spam
Please do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.
4) NSFW is okay, within reason
Just remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com.
NSFW comments should be restricted to posts tagged [NSFW].
5) This is not a support community.
It is not a place for 'how do I?', type questions.
If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.
6) No US Politics.
Please don't post about current US Politics. If you need to do this, try !politicaldiscussion@lemmy.world or !uspolitics@lemmy.world
7) No Hit-and-Run questions.
Please don't delete your post for no apparent reason. If you plan on deleting a question later, say so in the post, or if you feel that you have a good reason to remove it, message a mod beforehand. It's not fair to the ones who took their time to answer, and it's not in the spirit of the community.
Reminder: The terms of service apply here too.
Partnered Communities:
Logo design credit goes to: tubbadu
Everyone should pick up an obscure language and try to be productive with it. It teaches you to be self-sufficient.
Some time ago I wanted to start learning a functional language and looked at Ocaml and Elixir. Ocaml looked like a quite versatile language but in the end I went with Elixir because it looked like it could open up more new use cases compared to the languages I already knew (Python, C). Massive concurrency looked cool and also I wanted to get a bit into web dev stuff and Elixir has the Phoenix framework for that. So depends on what you want to do with it I'd say and how experienced you already are.
It's a pretty mature language so I see no reason why it can't be used for general purpose. Though I would check if they have proper libraries that fulfills whatever task you're trying to complete first. For instance, if you're doing machine learning, I would probably stick to Python.
One thing to note is that it's a functional programming language. If your previous exposure to programing in general is limited to Python, you will find the syntax and the general way of doing things confusing.
Unrelated to the thread. Thats a great username. [Object Object] haha.
I think that it's fine technically
the ML family of languages have extensive static typing functionality that I like
but Rust has enough overlap in functionality and has greater uptake. (I say this not having spent enough time to really come up to speed on Rust myself.) A quarter century back, ocaml was the language that I was most impressed with for strong static typing functionality. In 2026, I think I'd probably look at Rust and only go to ocaml if Rust doesn't suit your needs.
As to whether it can be a "daily driver"...I mean, you can use any language daily. I do think that it's hard to appreciate how helpful it is to have all the examples and library support and tools until you move from a popular language to a less-used one and suddenly discover that you want something that isn't there.
So can you use it? Sure. Is it the first option I'd recommend to someone who
and I assume that this is why you're looking at it, if your alternative is Python
wants to move to a statically-typed language? No. Is it a terrible choice? No, it'd also be a long way from the bottom of the list that I'd recommend.
If you want to learn it for fun, practice and personal projects - yes.
Do you already know another programming language? If so learning additional languages is a benefit, the more you know the easier will be to pick up new ones. If you're just starting, Python is a better choice to get over the basics.
It was fun in college and a bit after. You dont lose anything learning it.
I personally like python more for scripting an MVP out really quick. Ocaml has some nice algorithmic stuff and I remember a UI library that made it fun.
OCaml is a complete language you could use it as a daily driver. Cornell put out a pretty cool course here. It's very closely related to F# which which is neat!
I would not recommend OCaml for a beginner, and while is probably a tad faster than Python, its userbase sizes differ wildly as in: Python is basically everywhere, while Caml/OCaml is an absolute small niche.