4 ms·
I completely agree. One of Zig's big competitors, Odin, has a more explicit syntax for this where `0..<5` is an open interval and `0...5` is closed.
by jamiejquinn 1y ago
I completely agree. One of Zig's big competitors, Odin, has a more explicit syntax for this where `0..<5` is an open interval and `0...5` is closed.
- brabel 1y agoI think that comes from Ruby, right? I know Groovy is inspired by Ruby and has exactly the same syntax. EDIT: oh just noticed it's 3 dots in the close case... in Groovy it's just 2.
- psnehanshu 1y agoI even forget which word means what, "open", "close"
- thegeekpirate 1y agoOdin's even better than that—you can only use `0..<5` and `0..=5`, so there's never any ambiguity whatsoever.