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

Not really. Strings are a list of integers [1], integers are signed and fill a system word, but there's also 4 bits of type information. So you can have a 28-bit signed integer char on a 32-bit system or a signed 60-bit integer.

However, since Unicode is limited to 21-bits by utf-16 encoding, a unicode code point will fit in a small integer.

[1] unless you use binaries, which is often a better choice.



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

Search: