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 revision | ||
rfc:counterargument:deprecate_php_short_tags [2019/08/05 22:53] – zeev | rfc:counterargument:deprecate_php_short_tags [2019/08/05 23:09] (current) – zeev | ||
---|---|---|---|
Line 16: | Line 16: | ||
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 - even though nothing about the underlying dry facts has changed. | 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 - even though nothing about the underlying dry facts has changed. | ||
- | 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 55: | Line 55: | ||
==== The Case For Keeping Short Tags ==== | ==== The Case For Keeping Short Tags ==== | ||
- | There are two main reasons for keeping short tags. | + | There are four main reasons for keeping short tags. |
=== Reason #1: There' | === Reason #1: There' | ||
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 # | + | === Reason # |
- | For users of short tags, deprecating them gives them a 100.0% needless headache. | + | Even though |
- | Put yourself in the shoes of a user or company | + | In practice, it means that users who want to use short tags need to take a concrete step to enable |
- | === Reason #3: Removing short tags would slow down migration to newer versions of PHP === | + | === Reason #3: Removing short tags would bring needless headache to our users === |
+ | |||
+ | For users of short tags, deprecating that syntax gives them a 100.0% needless headache. | ||
+ | |||
+ | 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 #4: Removing short tags would slow down migration to newer versions of PHP === | ||
PHP, like many other packages and languages - suffers from a long tail of users that are running on older versions for a variety of reasons. | PHP, like many other packages and languages - suffers from a long tail of users that are running on older versions for a variety of reasons. | ||
Line 77: | Line 83: | ||
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