Hacker News new | ask | show | jobs
by rigoleto 1282 days ago
I wish OCaml had something like F#'s lightweight syntax: https://learn.microsoft.com/en-us/dotnet/fsharp/language-ref...
6 comments

Note 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.

I'd never seen the verbose syntax for f#, I thought you had to write it the whitespace dependent way. Huh.
Lightweight syntax is a pain to use for blind people. Glad OCaml hasn't fallen for that fad.
Do blind people use special code editors? If so, they should probably have a whitespace sensitive mode to make this easier.
ReasonML or ReScript not your cup of tea? They are different syntactical front-ends for OCaml.
OCaml 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.
This so-called lightweight syntax gives me anxiety just scrolling through these examples.