Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Tell me the language that you're using and I'll find multitude of warts and "landmines".

2 out of 3 listed in the article (scoping of loop variables and variable shadowing) is the same in pretty much every other language, for good reasons.

The semantics of nil interface are surprising on first encounter, but when you think about other possible semantics, it turns out it's the best solution. Or at least I haven't seen a proposal for how it could behave better.



> Or at least I haven't seen a proposal for how it could behave better.

Java and C# just have null interface values compare equal to null. I've never seen this cause problems and have never heard any complaints about this.


But you can not call methods on null interface values. In Go that is perfectly reasonable and safe to do.


That doesn't matter. Calling methods and performing comparisons are two different things. I covered this here: https://news.ycombinator.com/item?id=12522941




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

Search: