3 ms·
Since I've been programming in the Go language for a few months now I've really often compared the compiler's strictness with the C/C++ compiler's default laxit
by cratermoon 9y ago
Since I've been programming in the Go language for a few months now I've really often compared the compiler's strictness with the C/C++ compiler's default laxity. The Go compiler won't even let you leave in an unused import, and there are a number of other things that in C would maybe generate a warning that won't compile in Go.
- thephyber 9y agoRust laughs and pats Go on the head.
- cratermoon 9y agoYou seem nice.
- mort96 9y agoI absolutely hate that you can't have unused variables in Go, or that you can't have unreachable code in Go or Java. It makes the already tiresome work of debugging significantly more frustrating.
- cratermoon 9y agoWhy? What's useful about unused variables or unreachable code?
- mort96 9y agoIt's not useful in shipped code, and absolutely should be a warning, but it's incredibly useful while creating the program or debugging.
- Twirrim 9y agoGo isn't even remotely close to strict. They optimised for speed vs correctness checking.