News for hackers. Stuff that matters.
Re:Bosque Programming Language by mcintyre1994 on Wednesday April 17, 2019 @10:01AM (#19682608)
Typed strings look really nice, something I tend to wish every language had eventually - though I'm not sure why you'd limit them to Strings and not allow them for all types? I really like the Logarithm example shown in the Dotty docs for instance: https://dotty.epfl.ch/docs/reference/other-new-features/opaq...
Re:Bosque Programming Language by mrkmarron on Wednesday April 17, 2019 @05:14PM (#19686537)
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.

Re:Bosque Programming Language by mcintyre1994 on Thursday April 18, 2019 @04:54AM (#19689681)
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.