Hacker News new | past | comments | ask | show | jobs | submit login

I think I just don't come across situations where I find myself needing generics in the software that I typically write. I can imagine it would suck in those situations. There is a workaround for it, though. Basically you write a template and do code generation off of that to sort of approximate generics. I've never done it myself, though.



> I think I just don't come across situations where I find myself needing generics in the software that I typically write.

You don't need generics, sure. You can write working code in assembly, too. But abstractions catch more of your mistakes for you.

> There is a workaround for it, though. Basically you write a template and do code generation off of that to sort of approximate generics. I've never done it myself, though.

So, basically slightly more powerful macros, like in C, with most of the pitfalls and dangers associated with them.

There are better approaches to these problems.




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

Search: