Hacker News new | past | comments | ask | show | jobs | submit login

Could use something other than parens for bracketing tuples, so you don't have the conflict with the order-of-operations use of parens.



Such as?

All the brackets are currently spoken for: [] = list {} = set / dict <, > = less / greater than

I suppose you could overload <, > but I'm not sure that's much better.

Honestly, the more I've learned different languages the more I've come to the conclusion that little syntax changes like this are minor, for the most part, and what really changes the power and feel of a language are the abstractions that it allows for.


<> avoids syntactic ambiguity just fine-- There won't be an identifier or constant before it. <1,2,3> <1> and <> are all plausible-looking and you don't need to guess how to do 1 element or 0 element things if you know <1,2,3>.

> Honestly, the more I've learned different languages the more I've come to the conclusion that little syntax changes like this are minor, for the most part,

Sure, it's minor. But it's one of the few things I tripped over learning python and had to google repeatedly to get to stick in my head.

The fact that python has relatively few cases of weirdness like this-- compared to say, perl-- is a big part of what makes python nice.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: