this post was submitted on 04 Feb 2024
12 points (100.0% liked)

Functional Programming

1389 readers
1 users here now

founded 1 year ago
MODERATORS
 

I just started to learn Ocaml to learn functional programming. I will use it to build a CLI that's mostly orchestrating other programs.

My experience is mostly in JS / TS, but I've also coded a good bit in Python and Lua.

Below, I provided a list of things I learned or focused on while using OCaml. But I feel like I must be missing something. This is only moderately different from what I'm used to in JS. I expected something more radical. Moreover, I constantly hear a lot of FP jargon (like "highly kinded types", monads, etc) that I feel am still missing.

So far, here's what I studied:

  • immutability
  • avoid side affects
  • static typing
  • recursion instead of loops
  • option / maybe
  • higher order functions
  • conditionals and other constructs as expressions, when they're statements in other languages
  • pipelines and functions as input —> output
  • currying
  • scoping with let

What am I missing?

you are viewing a single comment's thread
view the rest of the comments
[–] matcha_addict@lemy.lol 1 points 9 months ago (1 children)

Is there a CaML worth exploring/using other than OCaml?

[–] xmunk@sh.itjust.works 2 points 9 months ago

CaML is more functionally pure but I think OCaML is generally more useful. I'd suggest just focusing on OCaML.