4 ms·
More syntax makes a language harder to read. The point isn't that making this special syntax would be harder, because it's not that hard. The point is that you
by joejev 9y ago
More syntax makes a language harder to read. The point isn't that making this special syntax would be harder, because it's not that hard. The point is that you don't need new syntax. In this case, the new syntax saves a few characters at best. I'm also don't think this syntax is any easier to read than a function call; I actually think it looks so similar that it would be easy to confuse with a function call making the language harder to read.
- alphaalpha101 9y agoBetter get rid of [1, 2, 3] then, because you can just use list(1, 2, 3). And they should get rid of {'a': 1, 'b': 2} as well, because you can use dict(list(tuple(str(65), 1), tuple(str(66), 2))) right? I think it's a bit of a stretch to say it's easy to confuse with a function call, given that tuples already exist. I don't see how (a=0, b=2) would be confusable with a function call anyway, no more than (0, 2) is.