Hands down my favorite syntax is ML family of languages ocaml/f#/haskell/Elm
let registerNewUser dbClient =
request ( fun inputGraph ->
Newtonsoft.Json.JsonConvert.DeserializeObject<UserRequest>(inputGraph.rawForm |> System.Text.ASCIIEncoding.UTF8.GetString)
|> hashPassword
|> registerWithBson dbClient
|> RealWorld.Convert.userRequestToUser
|> jsonToString
|> Successful.OK
)
Why? Whitespace is a natural idiom in written languages. We use indentation in table of contents, spaces between words, paragraphs, etc. So adding glyphs like brackets or begin…end in a language is completely redundant. In ML family languages all symbols have contextual meaning. Parenthesis are used to group “stuff” together. Brackets are added when the need to indicate a “block” only in certain contexts.
Simply put, if whitespace significance didn’t matter in programming languages, then remove all of the spaces in your C family languages that the compiler is happy to build and see if you like it LOL
That being said, I don’t dislike C-family languages (I program in swift and kotlin on my job) but ML syntax is definately the most pleasant for me to read due to the low visual “noise”.