Hacker News new | ask | show | jobs
by pbhjpbhj 2107 days ago
I agree that it's a question of type: what would you call that type though?

I propose "pun" - proportion of unity, or "p(er) un".

1 comments

Between0And1Inclusive

I like verbosity!

Or use a dependent type language. Maybe Idris? Then something like Between(0,1) I guess.

Nothing wrong with the name ZeroToOneInclusive. Seems like a great type to have around, and a great name for it. UnitFloat or UnitIntervalFloat or other ideas ITT are cuter but not much clearer.