8 ms·
Exactly the same here. I write Ruby for a living and use 'unless' where it makes sense or fits with existing code. That said, when reading code, I often have t
by qubitcoder 4y ago
Exactly the same here. I write Ruby for a living and use 'unless' where it makes sense or fits with existing code.
That said, when reading code, I often have to pause and mentally translate "unless" to "if not". This is especially true for more complex logic.
Elegant, yes. Additional mental overhead at times, certainly.