Hacker News new | ask | show | jobs
by elcaro 1298 days ago
I'll repeat the sentiment that "always" and "never" rules usually have their fair share of exception.

And while I agree that [closed, open) intervals are often the best choice... sometimes what you want is [closed, closed], or (open, open), and it's nice to use a language that makes that easy.

For example, Raku makes it easy to do:

  [closed, closed] with ($a .. $b)

  [closed, open) with ($a ..^ $b)

  (open,  open) with ($a ^..^ $b)

  (open, closed] with ($a ^.. $b)