Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Lensflare17475337dSwift got rid of many paranthesis like in control flows:
if x < 10 {
//…
}
for index in 0…10 {
//…
} -
Voxera11388336dWhy and when,sure there might be some that are technically redundant but they might serve a contextual purpose to distinguish between different things.
And removing something that already exists take careful planning since you do not make breaking changes unless there is a gain outweighing the problems with the change. -
lorentz15183336dPython's syntax tree is so fucked because of this bizarre choice that you
- can't have locals in lambdas
- can't break an expression into multiple lines without parenthesizing it.
To reiterate, these aren't stylistic choices, they're consequences of Python relying on what should be circumstantial information to figure out where the braces and semis would be. -
lorentz15183336dBy the way, the consequence of the above two is that
lambda x: (
.. function body
)
is exceedingly common in python code. It still can't contain locals but at least this is allowed to contain any number of operations. -
CoreFusionX3511336d
-
donkulator3064336d@CoreFusionX They are the same if you apply the operators in order of how many whitespace characters they are surrounded by.
Related Rants
Someone should do away with parentheses, just like python did away with braces.
random
python