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

> A better solution would be to have a way to indicate "this parameter needs to be this type".

If only there were some kind of concept of typing, perhaps enforced by the language and statically applied, which would eliminate this class of error entirely...boy, that would be helpful in larger systems.



For those who don't know, these are called prepared statements. Instead of mashing strings together, you define variables in your sql string, and associate a value and type with each variable. Of course this doesn't stop bugs in the implementation, as in this case.


I believe the parent was mocking Ruby for its dynamic typing, rather than what you're discussing.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: