10 ms·
It's just as easy in C to write that linter in the post-libclang world. (Except that it's not necessary, since all major open source compilers support the warn-
by pcwalton 11y ago
It's just as easy in C to write that linter in the post-libclang world. (Except that it's not necessary, since all major open source compilers support the warn-unused-result attribute as a builtin, while Go requires an external tool.)
Go's error model doesn't differ fundamentally from that of C. The built-in unused value error helps a lot by catching a sizable subset of cases, though; Go's designers made the right call there.