Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ocaml can be as imperative as you need it to be. Or as functional.

It has no dogmatic inclination towards functional. It has a very pragmatic approach to mutation.



True, but writing imperative code in OCaml feels quite right. Maybe it's just me, but it always feels significantly clunkier than the functional equivalent. I've had things I've been implementing and though "this works be easier to express imperatively", and almost invariably I've gone and rewritten the code to be functional because of how ungainly the imperative implementation ended up being. It feels a bit too much like somebody embedded a subset of Rexx or Pascal awkwardly into an otherwise perfectly reasonable functional language




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: