News for hackers. Stuff that matters.
Re:Things I Love About Go by blinks on Friday June 22, 2012 @06:01PM (#4149059)
I _think_ the complaint is the following:

if x == nil { x.doSomethingCrazy(); // Runtime error? } else { ... }

"Boolean blindness" (bah) is that either the type system should catch this at compile time (because we know x is nil), or the language should make it impossible to phrase (pattern matching to pull the information out, such as with the Maybe type).

Go has many type system oddities (reflection instead of generics, for instance), but the things they _have_ done (auto-implementation of interfaces, for example) are pretty cool.

Re:Things I Love About Go by Peaker on Friday June 22, 2012 @06:25PM (#4149165)
I find it unforgivable for a language in 2012 to repeat decades old design mistakes, and for no apparent benefit.

What's worse is that it appears this was all done out of ignorance, not conscious choice.

Re:Things I Love About Go by CasualSuperman on Friday June 22, 2012 @07:01PM (#4149325)
You think Rob Pike and Ken Thompson made what you consider a mistake out of ignorance? Just because you don't like it doesn't make it a mistake.
Re:Things I Love About Go by Peaker on Friday June 22, 2012 @07:31PM (#4149433)
What benefit does it have? What purpose does it serve?

As far as I know, these guys have a reputation in industry moreso than in academic circles. It seems entirely believable that they have taken no interest in language design outside of industry, where the state of the art lags a few decades behind that of academia.

Re:Things I Love About Go by CasualSuperman on Friday June 22, 2012 @08:10PM (#4149585)
The benefit is not having to code it. The most bug-free components are the ones that aren't there. Also, it's only v1. I don't think anybody's said that they're opposed to putting it in, so give it time. Maybe file a feature request.
Re:Things I Love About Go by Peaker on Saturday June 23, 2012 @06:42AM (#4150547)
I think if they add sum types and pattern matching or otherwise make this feature possible, it will completely change the way people write Go code and it would become a very different language.

Consider all the error-checks in Go -- these are all incorrect from a boolean-blindness perspective, and that would be a lot of code to rewrite if they add proper constructs to Go. Thus, I really believe it is just a mistake -- one that is only possible to make out of ignorance.

Re:Things I Love About Go by CasualSuperman on Saturday June 23, 2012 @05:37PM (#4151890)
Because Go is concurrent and has mutable types, race conditions could cause the assumptions gleaned from the booleans to be false in the very next statement. Boolean blindness is a result of the language.
Re:Things I Love About Go by Peaker on Sunday June 24, 2012 @03:45AM (#4152852)
No, that's false -- consider the Maybe case. If you carry around the content of the Maybe, it will still remain valid even after the Maybe itself is overwritten. Races are of course still possible but they don't relate to boolean blindness.
Re:Things I Love About Go by CasualSuperman on Sunday June 24, 2012 @06:33PM (#4154414)
So you want to copy the data every time there's an if? Some other part of the program could have a pointer to it otherwise.