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

It looks that you don't do any checks if the object is really initialized with the value of the given type? However, if you did, then one could use this for a quick & elegant input validation and that would be extremely cool. It should check the value in the constructor and throw the exceptions if the type is wrong. And then you will also need more granular types like Integer and Float to make this more useful for everyday cases.


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

Search: