3 ms·
That's actually the more 'normal' way of doing it. In type theory (or mathematics in general), you almost always write value: Type. (For instance F: A -> B.) T
by Retra 11y ago
That's actually the more 'normal' way of doing it. In type theory (or mathematics in general), you almost always write value: Type. (For instance F: A -> B.)
This is how it is done in ML, Haskell, Erlang, Rust, Smalltalk, etc...
It's mostly just C-like languages that do it the other way.
- dpc_pw 11y agoAs dayjob C coder, I just find the way types are written in C complete nonsense (especially when you start declaring pointers to functions), and no modern language should force that horror upon developers. Go types syntax is well done, IMO, even though I'm not into Go language that much (I rather Rust).