4 ms·
I wish OCaml had something like F#'s lightweight syntax: https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/verbose-syntax https://learn.microso
by rigoleto 4y ago
I wish OCaml had something like F#'s lightweight syntax: https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/verbose-syntax https://learn.microsoft.com/en-us/dotnet/fsharp/language-ref...
- runevault 4y agoI'd never seen the verbose syntax for f#, I thought you had to write it the whitespace dependent way. Huh.
- bitbckt 4y agoIt's been tried https://people.csail.mit.edu/mikelin/ocaml+twt/ https://people.csail.mit.edu/mikelin/ocaml+twt/
- KMag 4y agoNote that The Whitespace Thing actually preceded F#. (Mike and I were in the same fraternity, I remember talking to him about TWT, and we haven't talked much since our college days, which pre-date F#.) IIRC, Mike was also doing a bunch of stuff with a Jabber client in OCaml around that time.
- cies 4y agoReasonML or ReScript not your cup of tea? They are different syntactical front-ends for OCaml.
- hawk_ 4y agoLightweight syntax is a pain to use for blind people. Glad OCaml hasn't fallen for that fad.
- naasking 4y agoDo blind people use special code editors? If so, they should probably have a whitespace sensitive mode to make this easier.
- robot9000 4y agoThis so-called lightweight syntax gives me anxiety just scrolling through these examples.
- yawaramin 4y agoOCaml syntax is whitespace-insensitive. You don't need to worry about indentation, copy-pasting code snippets, etc. I think that makes for a better experience especially for beginners when the parser is more forgiving.