3 ms·
In my fever dreams, it means all the world's javascript will become OCaml instead, running on the server and the browser praise science.
by jackmott 10y ago
In my fever dreams, it means all the world's javascript will become OCaml instead, running on the server and the browser
praise science.
- acchow 10y agoTo be honest, as much as I like Ocaml I think half of programmers won't be able to learn it. At least not to its full extent (monads, functors, GADTs). There's a reason functional programming never took off in the mainstream.
- jasim 10y agoAny programmer who can put a loop together can learn OCaml and Haskell and Idris and Agda and APL. It is just that it takes time and effort. It won't be a cakewalk like when we first began to learn imperative programming - learn through osmosis and unstructured play. It would be more like learning maths, or playing an instrument from the very basics. You have to work through basic problems, read a lot, practice a lot, and slowly build up your intuition. Over time a -> b -> c will feel natural to you, you'll be able to write pattern match expressions without thinking about it, and will be astounded by your own cleverness when you're able to express things elegantly using types. I've been trying to learn Typed FP for the last six months, and it is opening up slowly but surely. I'd recommend this path to anyone who's been programming for a while (I've been at it for 10 years now), and wondered whether this was all there was to it. Beyond these ever-changing APIs and fads and thought-leaderships, there is a whole new world of programming out there in the Typed FP community. You should check it out. It'll make you confident to tackle larger and harder problems and maybe bring the fun back into programming. OCaml and Reason and BuckleScript is a great starting point - the community is nice and welcoming. Real World OCaml by Minsky, Madhavapeddy, and Hickey is a text with a lot of insights. You can also go straight to Haskell, but its web-browser story is not as good as OCaml's (thanks to BuckleScript). Or there is PureScript - for which IMHO you'd probably need to already know some Haskell. (Wrote this and realized I was talking to people who'd think that OCaml is hard, not the parent)
- klibertp 10y ago> Any programmer who can put a loop together can learn OCaml and Haskell and Idris and Agda and APL. > I've been trying to learn Typed FP for the last six months, and it is opening up slowly but surely. Yes, exactly. Every kind of programming is just programming and if you already succeeded in learning one kind you should be able to learn any other kind of programming with enough effort. The problem is in convincing enough people that a) the effort required is not that great or b) that the particular kind of programming is worth knowing despite the effort required or both.
- klibertp 10y ago> There's a reason functional programming never took off in the mainstream. Sure. The main reason is a substandard (and I'm being very generous here) way FP - and more generally, programming - is taught. Take a look at http://fsharpforfunandprofit.com/ http://fsharpforfunandprofit.com/ - it describes all the "hard" FP concepts in an interesting and easily digestible fashion.