It seems an interesting language to learn, can you use it as a daily driver like Python?

all 11 comments

sorted by: hot top controversial new old
[–] 5 points 3 months ago* (1 child)

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.

  • source
  • hideshow 1 child comment
  • [–] 4 points 3 months ago* (last edited 3 months ago)

    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.

  • source
  • [–] 4 points 3 months ago (1 child)

    Everyone should pick up an obscure language and try to be productive with it. It teaches you to be self-sufficient.

  • source
  • hideshow 1 child comment
  • [–] 4 points 3 months ago

    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!

  • source
  • [–] 2 points 3 months ago

    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.

  • source
  • [–] 2 points 3 months ago

    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.

  • source
  • [–] 2 points 3 months ago

    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.

  • source
  • I programmed pretty intensively in OCaml a couple years ago to get a better understanding of the language.

    It is a fine language, perfectly suited for general purpose programming, and is in general decently ergonomic. I personally won't use it as my perfered language though. I find the functor/module system way too powerful, and can easily cause confusion in complex settings. There really is no better system for adhoc polymorphism than type classes. But people standby modules though.

    I feel the good part of OCaml are generally avaliable in most good programming language, thus I kind of feel that the share for OCaml might slowly getting eaten by Rust, but we will see.

  • source
  • [–] 2 points 3 months ago