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

I run into most issues when implementing datatypes like stacks/queues etc

It would be so much more beneficial to write one stack struct with associated methods rather than having to duplicate functionality for each type.

It's possible to use empty interfaces, but then you have to do runtime type assertions which defeats the point of static typing.

Maybe I've just been spoiled by Haskell/Java in that side of things, but I really feel that compile time static typing solves A LOT of development problems



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

Search: