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

String shouldn't be abstract, just like ArrayList shouldn't be abstract. Why? Because you should use composition, not inheritance. You should introduce types for your concepts in your code to avoid these type of problems. But it's always tempting to avoid it in order to simplify the design. It's always a tradeoff, but personally I think more use of typing would be good in most projects that I've seen.



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

Search: