4 ms·
Yes exactly. I mentioned in another comment that rust allows this, and having used it I think the best of all worlds. My favorite part is that its easy to add
by josephg 8y ago
Yes exactly. I mentioned in another comment that rust allows this, and having used it I think the best of all worlds.
My favorite part is that its easy to add extra statements into the conditional blocks if you want. Doing that with ternaries requires either using the comma operator, repeating the condition on another line or refactoring the whole expression back out into if-else chains. All of those options are bad.