Hacker News new | past | comments | ask | show | jobs | submit login

A string works. If a numerical/in-place representation is wanted for efficiency, you could rely on the fact that stock symbols are always less than 8 characters, so we can parse it into an array of 8 bytes.



Is wrapping a String in a semi-opaque newtype (or a type alias at least) good to encode the semantic meaning of the string type?


Actually they are definitely not always <= 8 characters, but usually they are.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: