4 ms·
Is that why Go forces K&R brackets instead of letting you choose?
by voidUpdate 2y ago
Is that why Go forces K&R brackets instead of letting you choose?
- fuzztester 2y agoKernighan was a co-author of the Go book, but I don't know how much he was involved with the actual design of the language. Maybe not much, or at all, although, of course, he is a key part of the original Unix mafia (my term, not pejorative, rather meant admiringly, because I cut my programming teeth on UNIX and C software and books, and worked on that platform a lot, earlier), many of whom are still going strong in their 70s and 80s. So the Go bracket style may not be attributable to him.
- bxparks 2y agoMaybe you already know this and your comment was in jest, but the real reason is that the Go lexer automatically inserts semicolons (https://go.dev/doc/effective_go#semicolons https://go.dev/doc/effective_go#semicolons) using heuristic rules which forces the opening brace to be on the same line.
- fuzztester 2y agoI never liked that decision.
- fuzztester 2y agosneer. sneer. sneer. heck, that sounds like three cheers. so i should abbreviate it to three sneers in future. :) so, three sneers, for yet another blindly downvoting hn hive mind bro type who can't handle even an innocuous opinion (like my "never liked that decision" comment above), just because it is different from their own opinion. in other words, homo intolerantis. there are a lot of such jokers on this site. who cares about that behaviour, though? not me, for sure. hn is just some site, not important in the real world, except for those people who have nothing better to do than hang around here all day or night, and snipe at and try to put down others. iow, trolls and loser types. as amy hoy said somewhere a while ago, maybe on her site or on twitter, fuck hn. look, uncle darwin, i discovered a new (creepy) subspecies of homo sapiens, who i hereby name homo intolerantis. :) keep downvoting me, bro type, even pull in your friends to do more of it, and thereby waste all your time, and get ulcers and high blood pressure because of my innocuous comment, probably you have a lot of free time because of no job because of layoffs, while i have a good laugh at your stupidity and cheap malice.
- voidUpdate 2y agoIt's not that big of a deal... I get downvoted all the time, its just what happens on a social site like this with ratings. Whoever did it probably won't even see your comment anyway
- voidUpdate 2y agoI knew that it inserts semicolons but I still don't understand why they removed semicolons entirely and forced a bracketing style. The comment was in mild jest to that maybe being the reason why