100
submitted 2 days ago* (last edited 2 days ago) by CoderSupreme@programming.dev to c/programming@programming.dev
you are viewing a single comment's thread
view the rest of the comments
[-] cyclohexane@lemmy.ml 8 points 1 day ago

Sad I had to scroll to the end to see this.

Ocaml is brilliant and has the nicest type features. It's almost like Haskell but more approachable imo.

[-] AbelianGrape@beehaw.org 2 points 6 hours ago* (last edited 3 hours ago)

As a Haskell programmer, "OCaml has the nicest type features" hurts just a little bit.

I sometimes teach a course in OCaml. The students who are very engaged inevitably ask me about Haskell, I encourage them to try it, and then they spend the rest of the semester wondering why the course is taught in OCaml. Bizarre how different that is from when colleagues in industry want to try Haskell.

[-] paperplane@lemmy.world 3 points 1 day ago

Coming from Haskell, OCaml always felt a bit strange to me. The double semicolons, the inconsistency in the standard library between curried and uncurried functions etc. Maybe I'm confusing it with Standard ML though, can't remember.

[-] cyclohexane@lemmy.ml 2 points 1 day ago

I know double semicolons are a thing, but I've never had to use them. I forget what they're for, but yeah it's supposed to be an escape hatch for something that shouldn't be happening iirc.

The curried snd uncurried functions... Maybe you are confusing with SML, because everything in ocaml is curried by default. Though admittedly the standard library could be more complete, but I personally am happy to use third party dependencies for less common things.

[-] xigoi@lemmy.sdf.org 3 points 1 day ago

I’ve recently been trying to learn OCaml and find it really nice. The major pain points are

  • C-style separate compilation with manually created headers
  • Small standard library
  • No generic print function
  • Hard to use external libraries
[-] AbelianGrape@beehaw.org 1 points 6 hours ago

Is Printf.printf not a good generic print function? It's even variadic!

[-] xigoi@lemmy.sdf.org 1 points 4 hours ago

When you want to print something, you can’t just Printf.printf x, you have to explicitly give it instructions on how to print a value of that specific type.

this post was submitted on 05 Oct 2024
100 points (94.6% liked)

Programming

17135 readers
296 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS