Hacker Newsnew | past | comments | ask | show | jobs | submit | more CasualSuperman's commentslogin

Yes, but then the program would never terminate, because that's what happens at the end of main. If main returns, it's saying that the rest of the code in main has executed.


They're actually not required in Go.


It's been like this since at least Opera 10; don't count on them doing anything about it.


Go has gdb support, so any program that uses it as a backend (like ddd) can debug Go code. http://golang.org/doc/gdb

Not as easy to use as a lot of debuggers, but it's widely known.

I don't know about Goclipse; I do all my development on the command line.


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.


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.


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.


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.


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.


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.


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.


Would be nice if it converted lists into their <ol> or <ul> equivalents.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: