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

Nit: Adding a keyword is not a breaking change, removing them is.

With PHP, you could argue that they were needed because it developed organically, instead of through a process by experienced language designers. I'm not sure about Python though.

Counter-example, Go hasn't had backwards-incompatible changes yet, and at the moment there's no compelling reasons to make a breaking 2.0 version - and any plans for a 2.0 version so far have minimal changes, so going to 2.0 should be a smooth and quick process.




> Nit: Adding a keyword is not a breaking change, removing them is.

Langages generally try to add contextual / soft keywords these days but otherwise it’s absolutely a breaking change: any variable named the same will trigger a parse error. That is why languages try to either not add keywords, or find ways to make them opt-in somehow.


>Nit: Adding a keyword is not a breaking change, removing them is.

Of course adding a keyword is a breaking change. It will invalidate all uses of that keyword where used as a variable. Perhaps PHP is unaffected, as it has sigils on its variables, but most languages, including haskell, do not.


> Perhaps PHP is unaffected, as it has sigils on its variables

Locals are prefixed but functions, constants, and classes are not.

Also barewords but that horror was removed in php 8.




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

Search: