2 ms·
>I think this example demonstrates the opposite of what you intended. Defer doesn't give you anything that you can't already do. Well, that's the whole point o
by coldtea 6y ago
>I think this example demonstrates the opposite of what you intended. Defer doesn't give you anything that you can't already do.
Well, that's the whole point of syntactic sugar.
Not that it gives you something you can't already do, but that it gives you a succint and better way to do it.
>Language features should be orthogonal. A new language feature should add something that is not possible or extremely painful to do with the existing language features.
I beg to differ, based on your definition of "extremely painful". Many kinds of syntactic sugar are welcome, even when the previous native solution wasn't "extremely painful" but e.g. just tedious or error prone.