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

I dislike duck typing; I much prefer to have an explicit declaration of what interfaces you are implementing. I also think the type system is too dynamic for a systems language (eg. their answer to generics requires run-time type checking for every operation).

Also, just as a gut-level reaction I didn't feel excited about any of the expressiveness that Go offers (compared with my reaction to Rust's pattern matching, which to me is a clear improvement over how you'd express an equivalent thing in C or C++).



> their answer to generics requires run-time type checking for every operation

Not quite, the Go implementation has runtime optimizations so that the cost for using interfaces/generics is incurred once at first use: http://research.swtch.com/2009/12/go-data-structures-interfa...


> their answer to generics requires run-time type checking for every operation

Go has no built in answer to generics. Trying to rebuild generics with other language features won't make it better.


I must have misinterpreted the intent of this from "Go for C++ Programmers":

> Because the conversion is dynamic, it may be used to implement generic programming similar to templates in C++. This is done by manipulating values of the minimal interface.

I thought they were saying this was their answer to generic programming, but it appears this is not the case. In any case, it was just an example of my general feeling that the type system is more dynamic than I prefer for systems languages.




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

Search: