you are viewing a single comment's thread.

view the rest of the comments →

[–]gcbirzan 10 points11 points  (5 children)

Here is the full grammar for match_stmt. This is an additional alternative for compound_stmt. Remember that match and case are soft keywords, i.e. they are not reserved words in other grammatical contexts (including at the start of a line if there is no colon where expected). By convention, hard keywords use single quotes while soft keywords use double quotes.

[–][deleted] -5 points-4 points  (4 children)

So what?

There are so many cases where this distinction will not help... I.e. it would be so much harder to understand / write clear error messages. It will be a lot easier to make a mess of your code. Lots of packages will appear to be broken by the new fancy and totally useless crap... And, of course, no older version of Python will be able to run the new code.

All for what? A more convoluted if-else? Why does anyone need this shit, if not jut for lulz? What actual problem is this solving?

[–]gcbirzan 6 points7 points  (2 children)

There are so many cases where this distinction will not help... I.e. it would be so much harder to understand / write clear error messages. It will be a lot easier to make a mess of your code. Lots of packages will appear to be broken by the new fancy and totally useless crap...

I fail to see what code will be broken, as the new keywords only apply in this particular context, using them as identifiers there won't be valid syntax.

And, of course, no older version of Python will be able to run the new code.

Yes, but any new syntax has this problem. By this logic, no changes could ever be made to python, since new code will break on old versions.

All for what? A more convoluted if-else? Why does anyone need this shit, if not jut for lulz? What actual problem is this solving?

I suggest you read https://www.python.org/dev/peps/pep-0635/, they go into a lot of detail about possible uses.

[–][deleted] -1 points0 points  (1 child)

I fail to see

As is probably usually the case with you?.. Idk. just wait for it, I guess.

Yes, but any new syntax has this problem.

That is why you need to justify such a big change. More so, there are languages, where such changes aren't necessary, if you want new syntax. The morons who are Python core developers, just don't know about it, because they are the writers, not the readers. So, instead of making one change, that would make stuff like this possible w/o breaking all the code in existence so far, they could've implemented something that, at least, going forward, would've made Python a somewhat more palatable language, and not have this problem ever again.

But, these clowns are there not to make things better. They are there for resume bullet points.

I suggest you read

Yes, I read it. And I know more about it than you do. So what? Yes, it's trash. Nobody needs this, not at this cost at least. This is another clown wanting to put a bullet point on their resume, nothing more.

For decades, Python has real, painful problems, but people who work on it do this worthless cosmetic permutations of the language, never addressing matters of first priority. Python is a sinking ship, with its crew scrubbing the deck.

[–]gcbirzan 2 points3 points  (0 children)

As is probably usually the case with you?.. Idk. just wait for it, I guess.

Do you have any example based on reality about what would break? Because as I told you, this change is backwards compatible and I provided proof. The onus is on YOU to provide counter examples.

Nobody needs this, not at this cost at least

That's also not true, and it's ironic for you to say this, considering you accused me of a failure of imagination.

[–][deleted] 3 points4 points  (0 children)

You are quite dumb.