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

But I am a bit mystified - I assume that in Java I cannot subclass String? Which seems to be the whole argument.

Well, you know what my answer to that will be :-)

(To be fair I have just written a session-cache- management system for python and did not subclass anything much. I suspect I should look into that :-)



No, the point of the argument was that people should be FORCED to subclass String. Which is kinda pointless, as its easy for lazy programmers to circumvent, and there ARE things that are fit to be represented by just Strings. But I do agree with the author that it should be either subclassed or run through a validator function in a lot of cases.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: