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

I love go, but my personal gripe with the type system is that there is no way to pass type information around without using a zero valued (or fully populated, it makes no difference) instance. For example, I have a factory struct with a New method that returns interface{MySignatures()}, but I cannot inform the factory of the concrete type I want it to produce without passing in something like new(ConcreteStructWithMySignatures). Some have suggested I pass in a string, but what is the point of a type system if I have to use strings to reason about my types?


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

Search: