News for hackers. Stuff that matters.

fooooor

Re:Go 1.27 Interactive Tour on Sunday August 02, 2026 @11:14AM (#49145390)
Rust solved this, but the Go language developers are having too much prestige to be able to embrace Rust’s solution. Sad.
Re:Go 1.27 Interactive Tour on Sunday August 02, 2026 @11:09AM (#49145357)
On the contrary, linq in C# is a killer function that other languages still fail to replicate.

How many sloc are required for this?

var max = mycollection.Max();

Probably 5-10 if you’re missing higher order functions. And the risk of bugs will be 10x.

Re:Go 1.27 Interactive Tour on Sunday August 02, 2026 @11:00AM (#49145281)
I still don’t understand why Go isn’t the primary supported language for android.
Re:Go 1.27 Interactive Tour on Sunday August 02, 2026 @10:58AM (#49145268)
Luddites don’t use syntax highlighting though.
Re:Go 1.27 Interactive Tour on Sunday August 02, 2026 @10:57AM (#49145258)
No it’s definitely not that simple. Code are read more often than written, no one works in a vacuum, especially not in open source. Also, when in Rome...
Re:Go 1.27 Interactive Tour on Sunday August 02, 2026 @10:50AM (#49145192)
Lambdas usually have short variable names because the scope is small, typically half a line. And that is fine, even optimal.
Re:Go 1.27 Interactive Tour on Sunday August 02, 2026 @10:40AM (#49145107)
What could be more idiomatic than:

for (int i=0; i<10; i++) { printf(”%d\n”, i); }

(Or the very similar Go equivalent)

If you having a hard time parsing that, due to the short variable name, i.e. if it’s a huge cognitive load for you, I suggest you switch career, b/c the IT industry is obviously not a good fit.

With that said, Go is explicit with suggesting short variable names for small scopes, and long variable names for bigger scopes. This a good practice in all languages.