4 ms·
Structural types are one of those things that annoy me in both theory and practice, when I have to touch Go code. In theory, it's annoying because it prevents
by Nullabillity 6y ago
Structural types are one of those things that annoy me in both theory and practice, when I have to touch Go code.
In theory, it's annoying because it prevents you from expressing constraints (think: monad laws, or Rust's Sync/Send traits). In practice, it makes stuff like go-to-definition nearly useless, which makes it a pain to read code written by other people. Especially when combined with the almost sadistic module system.