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

The modern solution to this problem is to use different types for semantically distinct categories, even if the in-memory representation is effectively identical. Noticing that you’re mixing HTML-safe and HTML-unsafe strings is exactly the sort of thing the compiler should be able to help you with.


There's a nice discussion on this topic under 2011's submission: https://news.ycombinator.com/item?id=2912702




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: