News for hackers. Stuff that matters.
Re:Half a decade with Go by LBarret on Tuesday November 11, 2014 @05:29AM (#8589190)
replace Go with Python in the text, and you won't see a difference: there are iterable, keyable, file-like interfaces, etc. And creating your own is trivial.
Re:Half a decade with Go by icebraining on Tuesday November 11, 2014 @06:29AM (#8589323)
Yes, but Python doesn't compile to a single binary, and usually runs much slower.

What people like about Go is its mix of features, not some specific one by itself.

Re:Half a decade with Go by pjmlp on Tuesday November 11, 2014 @06:57AM (#8589395)
Depends on the implementation.
Re:Half a decade with Go by cma on Tuesday November 11, 2014 @08:25AM (#8589649)
Python doesn't verify the interface is met until run time.
Re:Half a decade with Go by coldtea on Tuesday November 11, 2014 @08:56AM (#8589755)
With all the cases were Go pushes you to use interface{} that's the case in Go a lot of the time too.

If it had Generics that would be another thing.

Re:Half a decade with Go by ansible on Tuesday November 11, 2014 @10:18AM (#8590189)
With all the cases were Go pushes you to use interface{} that's the case in Go a lot of the time too.

However, you can wrap an interface{} using container (for example), with type-specific input and output functions, getting back compile-time type-checking. Yes, it is not optimal, and yes, you're still paying the price for type assertions.

If it had Generics that would be another thing.

I would like to see a good solution for this that integrates well with the rest of the language.

Re:Half a decade with Go by coldtea on Wednesday November 12, 2014 @03:20AM (#8594500)
I would like to see a ho-hum solution for this that's on par with what's offered on other languages.

I say that because the Go designers, despite having designed a quite mediocre language, suddenly when it comes to generics the want the perfect no-compromises solution or nothing.