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

Just store the string "empty" and hope there are no nihilists who've changed their names to match. Simple!


Real programmers encode emptiness as ZZZ...

(I once worked maintaining a MUD that used internal memory management and marked block terminals (which were unnecessary since it stored the length of blocks it had allocated) with ZZZ)


ZZZ? EEK!


Use vertical tab, or another whitespace or field separator character, like EOF etc. Generally something a modern keyboard won't be entering, and won't generally be transmitted over the wire.


Or just prefix everything so that your string domain doesn't shrink? Then you don't have to worry what your users enter.




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

Search: