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

Tip: you can express (city) time "zones" in the type system e.g. London time and New York time.


You can, but because the full set if timezones is only known at runtime, it is not terribly useful. You can statically distinguish a canonical static timezone (say UTC) vs a dynamic ine though.

Same for currency.


There are only a few useful times in markets e.g. London, new York etc.

If you don't know then there's no point but the idea is to stop you comparing prices from London close to new York and so on


I've gone as far as encoding bid and ask prices with different types, but tz really has never occurred to me. Closing times are also exchange/contract specific, not just location.




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

Search: