top | item 19686537

(no title)

mrkmarron | 6 years ago

There were some discussions for a more general system -- e.g. Int[Seconds] would be a typed int indicating the contents represented seconds.

We needed to think more about all of these usecases and how things worked so we decided to start with just strings as the most useful. It is great to see you had the same idea though and would definitely like to revisit this in the future.

discuss

order

mcintyre1994|6 years ago

To be fair Strings would solve a problem I have right now with Scala pre-Dotty, our object IDs are all strings and the compiler does nothing to stop you using a user ID in a method that expects a contact ID, etc.

For your Int[Seconds] example, I haven't used them at all but could it work something like the F# measures concept? That seems sort-of similar but more general from scanning the docs.