3 ms·
I spent several years in Haskell land a while back, my first functional experience after Lisp. Ocaml never clicked for me, I have a rare form of semicolon alle
by codr7 2y ago
I spent several years in Haskell land a while back, my first functional experience after Lisp.
Ocaml never clicked for me, I have a rare form of semicolon allergy and Haskell just looked a lot nicer to me.
But then I recently tried Reason and enjoyed it A LOT, so everything Ocaml is suddenly interesting.
- whimsicalism 2y agoi wish the reason syntax was the main one
- cwmoore 2y ago“If your intention is to compile or interpret files as scripts, double semicolons can and should be avoided when writing in OCaml. Leaving them does not raise errors, but they are useless. The compiler tolerates them to allow copy-paste from UTop to a file without having to remove them.“ https://ocaml.org/docs/toplevel-introduction#loading-libraries-in-utop https://ocaml.org/docs/toplevel-introduction#loading-librari... https://reasonml.github.io/ https://reasonml.github.io/ looks cool, OCaml with javascript.
- Taikonerd 2y ago> https://reasonml.github.io/ https://reasonml.github.io/ looks cool, OCaml with javascript. The Javascript-oriented part of ReasonML got forked to be its own language: Rescript. https://rescript-lang.org/ https://rescript-lang.org/
- disconcision 2y agoyou can, for now at least, still use reasonML with js_of_ocaml to compile to javascript if you like reason syntax but don't want to a more complicated relationship with the ocaml ecosystem (we use this for https://hazel.org https://hazel.org)
- cmrdporcupine 2y agoIt's funny because the thing that always turned me off from Haskell was that it feels like a stream of whitespace and identifies without good visual cues as to structure. I'm sure once you get the zen of it, it's fine. Like Lisp, I guess, you learn to think in its structure. But looking at a screenful of Haskell to me is intimidating. Of the bunch I found SML/NJ to be the most readable.
- eru 2y agoThe whitespace is the visual cue. But in any case, you can use curly braces and semicolons in Haskell just fine. You can also write your Haskell like Lisp, and add lots of parens everywhere, and use all operators in prefix-form.
- cmrdporcupine 2y agoWell there's apparently a not insignificant amount of Haskell at the new job I'm starting in a week, so I guess I'll see how I fare with it.
- eru 2y agoOh, what's the new job?
- int_19h 2y agoF#, while missing some of the more interesting features of OCaml (e.g. the expressiveness of its module system), also has indentation-sensitive syntax that ditches a lot of the scaffolding, including semicolons in most cases: https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/verbose-syntax https://learn.microsoft.com/en-us/dotnet/fsharp/language-ref...