Re:Rust creator Graydon Hoare is now at Apple working on Swift
by saghm on Tuesday January 31, 2017 @02:49PM
(#13534533)
The weirdest OCaml syntax (to me) is the way that that exceptions are essentially reversed camel case mixed with snake case (e.g `Not_found`, `Division_by_zero`). I assume that this was to try to imitate the structure of English sentences, but it feels bizarre to me when I see it in code.
[ Parent
| on HN ]
Re:Rust creator Graydon Hoare is now at Apple working on Swift
by dllthomas on Wednesday February 01, 2017 @03:12PM
(#13544609)
> the structure of English sentences
Or possibly French sentences...
Re:Rust creator Graydon Hoare is now at Apple working on Swift
by saghm on Saturday February 04, 2017 @01:30PM
(#13568201)
Good point, I forgot that OCaml is French. On a related note, I've heard that might be related to why the common style is to prefix the colon used for type annotations with a space, whereas in some other languages with that syntax (e.g. Rust and Scala), it's more common to see no space before the colon.