News for hackers. Stuff that matters.
Re:Always use [closed, open) intervals by alexchantavy on Tuesday November 22, 2022 @02:20PM (#33709984)
Dumb question but why is ‘[‘ called ‘closed’ and ‘)’ called ‘open’? I somehow would have thought the reverse.
Re:Always use [closed, open) intervals by layer8 on Tuesday November 22, 2022 @09:09PM (#33714242)
An open interval doesn’t include its boundaries. It’s like a room missing one or more walls, and which hence is “open” towards the respective side(s).

Imagine a series of adjacent boxes with shared walls, that you cut up. Depending on how you cut them up, each wall will stay with one of the boxes, which thus will remain “closed” on that side, while the other box who shared the same wall is now open on the side where you separated the boxes.

   +———+———+
   |   |   |
   +———+———+

       |
       V

  +———+  ———+
  |   |     |
  +———+  ———+

 closed  open
 
  [0,1] (1,2]
Re:Always use [closed, open) intervals by yjk on Wednesday November 23, 2022 @05:20PM (#33725258)
I assume the origins of how it's called ties to the mathematical definition of open/closed sets (https://en.wikipedia.org/wiki/Open_set).

In an (imprecise) way, the closed set is a water balloon and the open set doesn't have the rubber balloon wrapping the water - I would consider the water balloon to be 'closed' in this case.