Gleb Minaev
03/02/2023, 7:15 AM..<
operator to have <..
and <..<
operators? (Vote with 👍 if you want the operators too and 👎 otherwise.)firstToIncrease <..< k
is more readable than (firstToIncrease + 1) ..< k
.ephemient
03/02/2023, 8:06 AM..
inclusive-inclusive
..^
inclusive-exclusive
^..
exclusive-inclusive
^..^
exclusive-exclusiveelizarov
03/02/2023, 4:19 PM..<
makes sense was a fair amount of work.Gleb Minaev
03/02/2023, 5:03 PMstart
exclusively to end
exclusively" to code as-is, i.e. to for (smthng in start <..< end)
. But I have to translate them to interval definition like (start+1) .. (end-1)
, that is not so easy to read. And infix functions like until
makes it even worse because I have to understand the meaning of the infix operator. Whereas the operator ..
, etc. is much easier to read and <
suffix or postfix does not change the operator's image a lot, so its easier for me to read them instead of infix operators or ±1 corrections.
And I think that meaning of <..<
is not so hard to understand if you've seen ..
before. Which is not true for some really strange non-verbal operators in other programming languages.
For example, I just wrote a function that creates a sequence of k-permutations of elements from some given list sorted in lexicographic order. And I feel that I want to curse the inability to write <..<
.
But that is my subjective opinion. So I just wanted to listen to other opinions and to know if it's really my own problem. So thanks everyone for the answers!elizarov
03/03/2023, 9:05 AMGleb Minaev
03/03/2023, 9:10 AMephemient
03/03/2023, 11:42 AMelizarov
03/03/2023, 1:36 PMribesg
03/03/2023, 3:10 PM>..<