rfc:counterargument:deprecate_php_short_tags
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:counterargument:deprecate_php_short_tags [2019/08/05 22:52] – zeev | rfc:counterargument:deprecate_php_short_tags [2019/08/05 23:03] – zeev | ||
---|---|---|---|
Line 14: | Line 14: | ||
The motivation for removing short tags as it is illustrated in the V2 RFC is quite weak. Essentially - it does not present //**any**// new motivations that did not exist 20+ years ago, when this syntax was first introduced. | The motivation for removing short tags as it is illustrated in the V2 RFC is quite weak. Essentially - it does not present //**any**// new motivations that did not exist 20+ years ago, when this syntax was first introduced. | ||
- | It's certainly possible to argue that the wrong decision was made back then - but it's very difficult to justify a position claiming that it' | + | It's certainly possible to argue that the wrong decision was made back then - but it's very difficult to justify a position claiming that the situation is so bad that we must now remove this syntax |
- | The one thing that did change, which makes it even more difficult to justify this position, is that unlike back then, when PHP was rounding error in terms of language popularity, today - it is one of the most widely used languages in the world. | + | The one thing that did change, which makes it even more difficult to justify this deprecation, is that unlike back then, when PHP was rounding error in terms of language popularity, today - it is one of the most widely used languages in the world. |
==== Analyzing The Motivations For Deprecation ==== | ==== Analyzing The Motivations For Deprecation ==== | ||
Line 27: | Line 27: | ||
=== Counterpoint: | === Counterpoint: | ||
- | Short tags were, from the get-go, //**never meant for being used in portable code to begin with**// | + | Short tags were, from the get-go, //**never meant for being used in portable code to begin with**// |
- | Virtually all (if not literally all) projects that are meant for redistribution - be they apps or frameworks - have rules that prohibit the use of short tags. Short tags are used, de-facto, exclusively for non-portable code by people and companies that have complete control over their stack. | + | Virtually all (if not literally all) PHP-based |
In reality, deprecating short tags does not have any meaningful contribution to making PHP codebases more portable - the ones who need to be portable are already not using this syntax, and the ones which are not - aren't meant for distribution to begin with. | In reality, deprecating short tags does not have any meaningful contribution to making PHP codebases more portable - the ones who need to be portable are already not using this syntax, and the ones which are not - aren't meant for distribution to begin with. | ||
Line 43: | Line 43: | ||
This is precisely as true today as it was back in 1997-1998 when the tags for PHP were initially discussed. | This is precisely as true today as it was back in 1997-1998 when the tags for PHP were initially discussed. | ||
- | With one big difference - back in the late 90's, XML appeared to be the future of anything and everything - from configuration files, through transport protocols and all the way to databases. | + | With one big difference - back in the late 90's, XML appeared to be the future of anything and everything - from configuration files, through transport protocols and all the way to databases. |
To place more weight on XML incompatibility today than we did 20+ years ago (or any weight at all, for that matter) - seems awfully anachronistic. | To place more weight on XML incompatibility today than we did 20+ years ago (or any weight at all, for that matter) - seems awfully anachronistic. | ||
Line 61: | Line 61: | ||
By now, it should be clear that nothing happened since the late 90's that should make us radically change our minds regarding the negative impact of having short tags in the language. | By now, it should be clear that nothing happened since the late 90's that should make us radically change our minds regarding the negative impact of having short tags in the language. | ||
- | "If ain't broke - don't fix it". | + | As the saying goes - "if ain't broke - don't fix it". |
=== Reason #2: Removing short tags would bring needless headache to our users === | === Reason #2: Removing short tags would bring needless headache to our users === | ||
- | For users of short tags, deprecating | + | For users of short tags, deprecating |
- | Put yourself in the shoes of a user or company that has been using short tags for their internal projects for the last decade, and are now forced to spend time and money in order to run be able to run your app on PHP 8 - for **absolutely no gain**. | + | Put yourself in the shoes of a user or company that has been using short tags for their internal projects for the last decade, and are now forced to spend time and money in order to run be able to run your app on PHP 8 - for **absolutely no gain**. |
=== Reason #3: Removing short tags would slow down migration to newer versions of PHP === | === Reason #3: Removing short tags would slow down migration to newer versions of PHP === | ||
Line 77: | Line 77: | ||
Most of the people who are going to vote on this RFC are not users of short tags. I'm included on that list - I never use short tags in any PHP code that I write, and as far as I recall - I never have. | Most of the people who are going to vote on this RFC are not users of short tags. I'm included on that list - I never use short tags in any PHP code that I write, and as far as I recall - I never have. | ||
- | It is important to stress that this is not the question. | + | It is important to stress that this is not the question |
- | The internals@ mailing list tends to attract developers who are at the more at the forefront of PHP development than the PHP userbase at large - for quite obvious reasons. | + | By definition of its nature, the internals@ mailing list tends to attract developers who are at the more at the forefront of PHP development than the PHP userbase at large - for quite obvious reasons. |
==== Summary ==== | ==== Summary ==== | ||
- | Breaking compatibility should have an exceptionally good case, with tangible, strong gains associated with it. | + | Breaking compatibility should have an exceptionally good case, with tangible, strong gains associated with it. |
Deprecating short tags, as illustrated in this counterargument, | Deprecating short tags, as illustrated in this counterargument, | ||
Our time, and even more so - the time of our users - is much better spent elsewhere. | Our time, and even more so - the time of our users - is much better spent elsewhere. |
rfc/counterargument/deprecate_php_short_tags.txt · Last modified: 2019/08/05 23:09 by zeev