News for hackers. Stuff that matters.
Re:The New OCaml Website by giraffe_lady on Friday April 29, 2022 @01:56PM (#31208591)
I really think it's such a good fit for most of the daily non-web work I've had to do. It lets you keep the core logic clean & fun and then you can just shrug and let rip with the mutations or whatever when that makes the most sense.

I'm well out of my FP fanboy phase now but ocaml feels great for my favorite parts of that without being judgmental when I'm not in the mood.

Re:The New OCaml Website by anuragsoni on Friday April 29, 2022 @02:12PM (#31208755)
> It lets you keep the core logic clean & fun and then you can just shrug and let rip with the mutations or whatever when that makes the most sense.

Very true! I've used mutations and imperative OCaml quite a few times. Sometimes it was for performance reasons (I've been working on a web server library), and other times when loops either made the implementation a little easier to read, and/or helped avoid some allocations. I am glad that the language is pragmatic enough that I can still use mutation or imperative code where it makes sense, while still being able to present a nice clean api on top.