RE: [PHP-DEV] ?= and %= both work, why not ?php=
Not trying to impress anybody with anything. Just stating the simple fact that some people (myself included) find '?php= $var ?' easier to read than '?php echo $var ?'. I don't find it particularly 'cryptic'. - Theo -Original Message- From: Chris Shiflett [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 2:36 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] ?= and %= both work, why not ?php= Perhaps if it were a computer making these assumptions, yes. But anyone with half a brain can see that ?php echo 'Hello'; ? is much easer to understand for someone with no programming experience, than: ?php='Hello'?. Agreed, Sterling. I can't understand why this is so difficult to realize. Theo, are you just trying to impress people by saying how easy the cryptic syntax is? If so, it's not working. I, and others, would argue that '?php=' is no more 'magic' than '?php echo'. We know what it means. Seriously, Theo, this list isn't a place where everyone's ego is on the line. This is like arguing that the ternary operator in C is more intuitive than just writing the long if statement. Just because you and others know what it means is *not* a valid argument. This isn't a contest. You seem to have gotten the wrong impression. I for one am glad that PHP has remained as clean as it is. It is certainly a factor in PHP's success. Thanks for the tip, we didn't realize that. Well, Sterling, the sarcasm might have ben a bit harsh, but I must admit I laughed out loud when I read it. :) It's too bad really that ?= and %= are valid. I can guess why, but it leads to useless conversations like this. Chris -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
On Sat, 2002-04-27 at 03:30, Zeev Suraski wrote: At 03:18 27/04/2002, Rasmus Lerdorf wrote: It looks like we can. I was assuming the SGML characteristics for XML and it looks like I was wrong. A '' is ok inside the ?php ? tags. Ok, so that's actually useful. But it sounds odd - XML is not SGML compliant? You should know about SGML that it can be configured beyond belief, through the SGML declaration. You can change what characters in a document are valid, what character sequences should be used to delimit tags and almost everything else about the format. Different DTDs can be used with different SGML declarations, XML is used with one (try locate xml.dcl). This generality is why XML came to be: writing a fully-featured SGML parser required bat wings, toad spit and a black cauldron. - Stig -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
On Fri, 2002-04-26 at 20:07, Sterling Hughes wrote: Ok. #1 is the first logical, technical reason I've seen against the shorthand being fully implemented (though it begs the question why it was partially implemented in the first place). I'm not to knowledgeable about SGML specifics (and I can't afford to spend $200+ for a copy of the spec so I can spend a few weeks learning it just for this), so I can't go into that, but extending this to XML is a falacy, because PHP comparison syntax breaks the XML spec. I'm pretty sure that % echo $var % (valid PHP) would cause most XML parsers to choke. Just a guess, but when you say the alphabet, do you often say it as such: a,b,d,e,c,f,g,i... ? Your argument shows you either don't know php, or don't know how to think. The whole point of the ?php tag is to allow people to embed commands in XML documents. When short tags are disabled, commands such as % echo 'HELLO'; % don't work. If you allow ?php=? syntax, it is not valid XML, which negates the point of having ?php in the first place. As for #2 there's no flaw with the logic until you assume that '?php echo ' is somehow inherently more readable than '?php= '. That's a matter of opinion either way. Perhaps if it were a computer making these assumptions, yes. But anyone with half a brain can see that ?php echo 'Hello'; ? is much easer to understand for someone with no programming experience, than: ?php='Hello'?. By the time you get to #3, however, you've resorted to dreaming up new unrequested language extensions, and references to 'magic' to support your argument. I, and others, would argue that '?php=' is no more 'magic' than '?php echo'. We know what it means. If, as you imply, '?=' and '%=' are such a horrible disease that their very existance is proof that '?php=' would be a syntactic travesty. Why were they allowed in the first place? If they were implemented due to popular demand, why is popular demand not sufficient for '?php='? 42 If you really do want some equivalent to your proposed '?php~ $foo:$bar ?', then I might suggest '?php= isset($foo)?$foo:$bar ?', which I believe would already work as '?php echo isset($foo)?$foo:$bar ?', '?= isset($foo)?$foo:$bar ?'. Thanks for the tip, we didn't realize that. Sterling, please don't be abusive in plural first person. I for one have no desire to be associated with the attitude exhibited. - Stig -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
At 18:44 27/04/2002, Stig S. Bakken wrote: On Sat, 2002-04-27 at 03:30, Zeev Suraski wrote: At 03:18 27/04/2002, Rasmus Lerdorf wrote: It looks like we can. I was assuming the SGML characteristics for XML and it looks like I was wrong. A '' is ok inside the ?php ? tags. Ok, so that's actually useful. But it sounds odd - XML is not SGML compliant? You should know about SGML that it can be configured beyond belief, through the SGML declaration. You can change what characters in a document are valid, what character sequences should be used to delimit tags and almost everything else about the format. Different DTDs can be used with different SGML declarations, XML is used with one (try locate xml.dcl). This generality is why XML came to be: writing a fully-featured SGML parser required bat wings, toad spit and a black cauldron. I knew everything you said, except for the fact you can configure which characters are valid and which aren't :) Thanks, Zeev -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
Don't worry, you're not. :-) - Stig On Sat, 2002-04-27 at 03:44, Zeev Suraski wrote: Yes, but I thought it was SGML compliant (as in, some sort of a subset of SGML with lots of predefined rules, but still, falls into the SGML language category). But then, I could very well be wrong about this. Zeev At 05:37 27/04/2002, Andrew Lindeman wrote: I'm pretty sure XML is a scaled down and easier to learn/work with version of SGML. Correct me if I'm wrong --Andrew On Friday 26 April 2002 07:30 pm, Zeev Suraski wrote: At 03:18 27/04/2002, Rasmus Lerdorf wrote: It looks like we can. I was assuming the SGML characteristics for XML and it looks like I was wrong. A '' is ok inside the ?php ? tags. Ok, so that's actually useful. But it sounds odd - XML is not SGML compliant? Zeev -- We all know Linux is great...it does infinite loops in 5 seconds. (Linus Torvalds about the superiority of Linux on the Amterdam Linux Symposium) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] ?= and %= both work, why not ?php=
At 19:11 25/04/2002 -0400, Brinkman, Theodore wrote: Well, having read that thread (thank you), I tallied up the votes (where I could tell what the vote was) and it was 13 for, 3 against, 2 undecided/don't care. Of the unsure, one person voted against, then undecided, then for, the other voted don't care, then against. Of the against, one voted against purely on stylistic reasons. Why wasnt' this change implemented? It's not a feature anyone would be forced to use, it improves syntax consistency, and the feeling from that discussion was overwhelmingly for the change. Let's not get into it again. I'm sure you'll survive writing an extra 5 characters. Andi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] ?= and %= both work, why not ?php=
Sure, and its only an extra 4 character, really. But that's not the issue at hand. The issue at hand is that the inconsistency of supporting ?= and %= but not ?php= encourages quite a few people to use the 'optional' short form tags, meaning that their code isn't portable. For each person who says ?php= $variable ? is hard to read at least one other person says they find ?php echo $variable ? harder to read. I personally find the first easier to read when it is embedded in the middle of a long line of HTML (like an input tag for example). If you don't like to use the shorthand, don't. But, if there is a call from the masses (and 13 to 3 (81.25% for) seems pretty overwhelming to me) to support consistent availability features in the syntax (even if you don't like, or wouldn't use the feature) what technical reason is there to support inconsistent availability of the feature? What possible harm comes from improving the internal consistency of the language? Why is a two-line patch that would completely remove an inconsistency so bitterly fought against? If $i++ were only supported with the short tag forms, would people actually fight adopting it in the standard tag form because 'you'll survive writing an extra 3 characters'? - Theo -Original Message- From: Andi Gutmans [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 8:38 AM To: Brinkman, Theodore; 'PHP Developers Mailing List' Subject: RE: [PHP-DEV] ?= and %= both work, why not ?php= At 19:11 25/04/2002 -0400, Brinkman, Theodore wrote: Well, having read that thread (thank you), I tallied up the votes (where I could tell what the vote was) and it was 13 for, 3 against, 2 undecided/don't care. Of the unsure, one person voted against, then undecided, then for, the other voted don't care, then against. Of the against, one voted against purely on stylistic reasons. Why wasnt' this change implemented? It's not a feature anyone would be forced to use, it improves syntax consistency, and the feeling from that discussion was overwhelmingly for the change. Let's not get into it again. I'm sure you'll survive writing an extra 5 characters. Andi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] ?= and %= both work, why not ?php=
-Original Message- From: Brinkman, Theodore [mailto:[EMAIL PROTECTED]] Sent: 26 April 2002 14:55 To: 'PHP Developers Mailing List' Subject: RE: [PHP-DEV] ?= and %= both work, why not ?php= Sure, and its only an extra 4 character, really. But that's not the issue at hand. The issue at hand is that the inconsistency of supporting ?= and %= but not ?php= encourages quite a few people to use the 'optional' short form tags, meaning that their code isn't portable. I guy here who till recently poo-poo'd asp tags is now using them because %=$VAR;% is emminently more readable than the alternative. For each person who says ?php= $variable ? is hard to read at least one other person says they find ?php echo $variable ? harder to read. I personally find the first easier to read when it is embedded in the middle of a long line of HTML (like an input tag for example). Yep. What possible harm comes from improving the internal consistency of the language? Why is a two-line patch that would completely remove an inconsistency so bitterly fought against? To emphasise; people here are adopting bad-old short tags in order to keep readability of code. It makes it easy to see the code is passive, echoing only. Sam -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] ?= and %= both work, why not ?php=
Guys, this argument has been killed many times. Please stop. The reasons it won't change: 1. ?php is the SGML-compliant PI tag-style that is supposed to play nice with other technologies. ?php= would completely break that as the SGML spec (and the XML spec) says to use ?phpwhitespace so it would have to be ?php =$foo? which is even uglier and would cause a bit of trouble at the parser level. 2. The only reason for using ?php =$foo? is to save a few keystrokes. We have short_tags and asp_tags for example that reason. These are the non-compliant tag style that people have been taught are ok for local code, but shouldn't be used for distributed code. Therefore if you really do want to save keystrokes, which I am all for, use ?=$foo? or %=$foo% and you are happy. If you ever need to distribute your code, write a 30-second sed script that changes these to ?php echo $foo? for you. That way local hacks/shortcuts stay local, but the distributed code is proper and readable and people won't be wondering what the heck this = thing is. 3. The whole concept of =$var sucks. Magic tokens with no visible meaning is against the spirit of PHP. Yes, it has snuck in due to popular demand, but I see no reason to help the disease spread any further and give people precedence for then wanting stuff like ~$foo:$bar which might echo $foo if it is non-empty, $bar otherwise. A useful operation to be sure, but we don't want a language that looks like ?php~SID:new user? blah blah ?php=$user_name? It goes back to the old concept of keeping things readable. Figuring out what = and ~ do in this particular context is difficult. You can't just look them up in the index of a PHP book because first of all they are single-character common tokens, but worse, they are modal tokens. -Rasmus On Fri, 26 Apr 2002, Sam Liddicott wrote: -Original Message- From: Brinkman, Theodore [mailto:[EMAIL PROTECTED]] Sent: 26 April 2002 14:55 To: 'PHP Developers Mailing List' Subject: RE: [PHP-DEV] ?= and %= both work, why not ?php= Sure, and its only an extra 4 character, really. But that's not the issue at hand. The issue at hand is that the inconsistency of supporting ?= and %= but not ?php= encourages quite a few people to use the 'optional' short form tags, meaning that their code isn't portable. I guy here who till recently poo-poo'd asp tags is now using them because %=$VAR;% is emminently more readable than the alternative. For each person who says ?php= $variable ? is hard to read at least one other person says they find ?php echo $variable ? harder to read. I personally find the first easier to read when it is embedded in the middle of a long line of HTML (like an input tag for example). Yep. What possible harm comes from improving the internal consistency of the language? Why is a two-line patch that would completely remove an inconsistency so bitterly fought against? To emphasise; people here are adopting bad-old short tags in order to keep readability of code. It makes it easy to see the code is passive, echoing only. Sam -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] ?= and %= both work, why not ?php=
Ok. #1 is the first logical, technical reason I've seen against the shorthand being fully implemented (though it begs the question why it was partially implemented in the first place). I'm not to knowledgeable about SGML specifics (and I can't afford to spend $200+ for a copy of the spec so I can spend a few weeks learning it just for this), so I can't go into that, but extending this to XML is a falacy, because PHP comparison syntax breaks the XML spec. I'm pretty sure that % echo $var % (valid PHP) would cause most XML parsers to choke. As for #2 there's no flaw with the logic until you assume that '?php echo ' is somehow inherently more readable than '?php= '. That's a matter of opinion either way. By the time you get to #3, however, you've resorted to dreaming up new unrequested language extensions, and references to 'magic' to support your argument. I, and others, would argue that '?php=' is no more 'magic' than '?php echo'. We know what it means. If, as you imply, '?=' and '%=' are such a horrible disease that their very existance is proof that '?php=' would be a syntactic travesty. Why were they allowed in the first place? If they were implemented due to popular demand, why is popular demand not sufficient for '?php='? If you really do want some equivalent to your proposed '?php~ $foo:$bar ?', then I might suggest '?php= isset($foo)?$foo:$bar ?', which I believe would already work as '?php echo isset($foo)?$foo:$bar ?', '?= isset($foo)?$foo:$bar ?'. - Theo -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 10:42 AM To: Sam Liddicott Cc: Brinkman, Theodore; 'PHP Developers Mailing List' Subject: RE: [PHP-DEV] ?= and %= both work, why not ?php= Guys, this argument has been killed many times. Please stop. The reasons it won't change: 1. ?php is the SGML-compliant PI tag-style that is supposed to play nice with other technologies. ?php= would completely break that as the SGML spec (and the XML spec) says to use ?phpwhitespace so it would have to be ?php =$foo? which is even uglier and would cause a bit of trouble at the parser level. 2. The only reason for using ?php =$foo? is to save a few keystrokes. We have short_tags and asp_tags for example that reason. These are the non-compliant tag style that people have been taught are ok for local code, but shouldn't be used for distributed code. Therefore if you really do want to save keystrokes, which I am all for, use ?=$foo? or %=$foo% and you are happy. If you ever need to distribute your code, write a 30-second sed script that changes these to ?php echo $foo? for you. That way local hacks/shortcuts stay local, but the distributed code is proper and readable and people won't be wondering what the heck this = thing is. 3. The whole concept of =$var sucks. Magic tokens with no visible meaning is against the spirit of PHP. Yes, it has snuck in due to popular demand, but I see no reason to help the disease spread any further and give people precedence for then wanting stuff like ~$foo:$bar which might echo $foo if it is non-empty, $bar otherwise. A useful operation to be sure, but we don't want a language that looks like ?php~SID:new user? blah blah ?php=$user_name? It goes back to the old concept of keeping things readable. Figuring out what = and ~ do in this particular context is difficult. You can't just look them up in the index of a PHP book because first of all they are single-character common tokens, but worse, they are modal tokens. -Rasmus On Fri, 26 Apr 2002, Sam Liddicott wrote: -Original Message- From: Brinkman, Theodore [mailto:[EMAIL PROTECTED]] Sent: 26 April 2002 14:55 To: 'PHP Developers Mailing List' Subject: RE: [PHP-DEV] ?= and %= both work, why not ?php= Sure, and its only an extra 4 character, really. But that's not the issue at hand. The issue at hand is that the inconsistency of supporting ?= and %= but not ?php= encourages quite a few people to use the 'optional' short form tags, meaning that their code isn't portable. I guy here who till recently poo-poo'd asp tags is now using them because %=$VAR;% is emminently more readable than the alternative. For each person who says ?php= $variable ? is hard to read at least one other person says they find ?php echo $variable ? harder to read. I personally find the first easier to read when it is embedded in the middle of a long line of HTML (like an input tag for example). Yep. What possible harm comes from improving the internal consistency of the language? Why is a two-line patch that would completely remove an inconsistency so bitterly fought against? To emphasise; people here are adopting bad-old short tags in order to keep readability of code. It makes it easy to see the code is passive, echoing only. Sam -- PHP Development Mailing List
RE: [PHP-DEV] ?= and %= both work, why not ?php=
If, as you imply, '?=' and '%=' are such a horrible disease that their very existance is proof that '?php=' would be a syntactic travesty. Why were they allowed in the first place? If they were implemented due to popular demand, why is popular demand not sufficient for '?php='? I think the argument was that ?php was ment to be the standard (and therefore clean way) while ? And % is for the short hand freaks :-) Remember that one of the huge advantages of php is code readability. If you want short hand you can either use stuff like % or move over to perl. As an aside: what do you do most? Write or read/maintain code? Then think again about short hand stuff. So Rasmus's argument seems quite sound in my eyes. Best regards, Lukas Smith [EMAIL PROTECTED] ___ DybNet Internet Solutions GbR Reuchlinstr. 10-11 Gebäude 4 1.OG Raum 6 (4.1.6) 10553 Berlin Germany Tel. : +49 30 83 22 50 00 Fax : +49 30 83 22 50 07 www.dybnet.de [EMAIL PROTECTED] ___ -Original Message- From: Brinkman, Theodore [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 6:37 PM To: 'PHP Developers Mailing List' Subject: RE: [PHP-DEV] ?= and %= both work, why not ?php= Ok. #1 is the first logical, technical reason I've seen against the shorthand being fully implemented (though it begs the question why it was partially implemented in the first place). I'm not to knowledgeable about SGML specifics (and I can't afford to spend $200+ for a copy of the spec so I can spend a few weeks learning it just for this), so I can't go into that, but extending this to XML is a falacy, because PHP comparison syntax breaks the XML spec. I'm pretty sure that % echo $var % (valid PHP) would cause most XML parsers to choke. As for #2 there's no flaw with the logic until you assume that '?php echo ' is somehow inherently more readable than '?php= '. That's a matter of opinion either way. By the time you get to #3, however, you've resorted to dreaming up new unrequested language extensions, and references to 'magic' to support your argument. I, and others, would argue that '?php=' is no more 'magic' than '?php echo'. We know what it means. If you really do want some equivalent to your proposed '?php~ $foo:$bar ?', then I might suggest '?php= isset($foo)?$foo:$bar ?', which I believe would already work as '?php echo isset($foo)?$foo:$bar ?', '?= isset($foo)?$foo:$bar ?'. - Theo -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 10:42 AM To: Sam Liddicott Cc: Brinkman, Theodore; 'PHP Developers Mailing List' Subject: RE: [PHP-DEV] ?= and %= both work, why not ?php= Guys, this argument has been killed many times. Please stop. The reasons it won't change: 1. ?php is the SGML-compliant PI tag-style that is supposed to play nice with other technologies. ?php= would completely break that as the SGML spec (and the XML spec) says to use ?phpwhitespace so it would have to be ?php =$foo? which is even uglier and would cause a bit of trouble at the parser level. 2. The only reason for using ?php =$foo? is to save a few keystrokes. We have short_tags and asp_tags for example that reason. These are the non-compliant tag style that people have been taught are ok for local code, but shouldn't be used for distributed code. Therefore if you really do want to save keystrokes, which I am all for, use ?=$foo? or %=$foo% and you are happy. If you ever need to distribute your code, write a 30-second sed script that changes these to ?php echo $foo? for you. That way local hacks/shortcuts stay local, but the distributed code is proper and readable and people won't be wondering what the heck this = thing is. 3. The whole concept of =$var sucks. Magic tokens with no visible meaning is against the spirit of PHP. Yes, it has snuck in due to popular demand, but I see no reason to help the disease spread any further and give people precedence for then wanting stuff like ~$foo:$bar which might echo $foo if it is non-empty, $bar otherwise. A useful operation to be sure, but we don't want a language that looks like ?php~SID:new user? blah blah ?php=$user_name? It goes back to the old concept of keeping things readable. Figuring out what = and ~ do in this particular context is difficult. You can't just look them up in the index of a PHP book because first of all they are single-character common tokens, but worse, they are modal tokens. -Rasmus On Fri, 26 Apr 2002, Sam Liddicott wrote: -Original Message- From: Brinkman, Theodore [mailto:[EMAIL PROTECTED]] Sent: 26 April 2002 14:55 To: 'PHP Developers Mailing List' Subject: RE: [PHP-DEV] ?= and %= both work, why not ?php= Sure, and its only an extra 4 character, really. But that's
RE: [PHP-DEV] ?= and %= both work, why not ?php=
As I said. The assumption that '?php echo $var ?' is more readable than '?php= $var ?' is not universally supported. I'm not alone in finding the latter easier to read. To answer your aside, I spend alot of time writing code followed by reading and maintaining that code. I prefer the '?php' opening tag to '?' or '%', but I find '{opentag}= ' more readable than '{opentag} echo ', which means I have to either make my code harder for me to read, or I have to use tag styles which are not portable, and/or cause other issues. - Theo -Original Message- From: Lukas Smith [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 12:38 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DEV] ?= and %= both work, why not ?php= If, as you imply, '?=' and '%=' are such a horrible disease that their very existance is proof that '?php=' would be a syntactic travesty. Why were they allowed in the first place? If they were implemented due to popular demand, why is popular demand not sufficient for '?php='? I think the argument was that ?php was ment to be the standard (and therefore clean way) while ? And % is for the short hand freaks :-) Remember that one of the huge advantages of php is code readability. If you want short hand you can either use stuff like % or move over to perl. As an aside: what do you do most? Write or read/maintain code? Then think again about short hand stuff. So Rasmus's argument seems quite sound in my eyes. Best regards, Lukas Smith [EMAIL PROTECTED] ___ DybNet Internet Solutions GbR Reuchlinstr. 10-11 Gebäude 4 1.OG Raum 6 (4.1.6) 10553 Berlin Germany Tel. : +49 30 83 22 50 00 Fax : +49 30 83 22 50 07 www.dybnet.de [EMAIL PROTECTED] ___ -Original Message- From: Brinkman, Theodore [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 6:37 PM To: 'PHP Developers Mailing List' Subject: RE: [PHP-DEV] ?= and %= both work, why not ?php= Ok. #1 is the first logical, technical reason I've seen against the shorthand being fully implemented (though it begs the question why it was partially implemented in the first place). I'm not to knowledgeable about SGML specifics (and I can't afford to spend $200+ for a copy of the spec so I can spend a few weeks learning it just for this), so I can't go into that, but extending this to XML is a falacy, because PHP comparison syntax breaks the XML spec. I'm pretty sure that % echo $var % (valid PHP) would cause most XML parsers to choke. As for #2 there's no flaw with the logic until you assume that '?php echo ' is somehow inherently more readable than '?php= '. That's a matter of opinion either way. By the time you get to #3, however, you've resorted to dreaming up new unrequested language extensions, and references to 'magic' to support your argument. I, and others, would argue that '?php=' is no more 'magic' than '?php echo'. We know what it means. If you really do want some equivalent to your proposed '?php~ $foo:$bar ?', then I might suggest '?php= isset($foo)?$foo:$bar ?', which I believe would already work as '?php echo isset($foo)?$foo:$bar ?', '?= isset($foo)?$foo:$bar ?'. - Theo -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 10:42 AM To: Sam Liddicott Cc: Brinkman, Theodore; 'PHP Developers Mailing List' Subject: RE: [PHP-DEV] ?= and %= both work, why not ?php= Guys, this argument has been killed many times. Please stop. The reasons it won't change: 1. ?php is the SGML-compliant PI tag-style that is supposed to play nice with other technologies. ?php= would completely break that as the SGML spec (and the XML spec) says to use ?phpwhitespace so it would have to be ?php =$foo? which is even uglier and would cause a bit of trouble at the parser level. 2. The only reason for using ?php =$foo? is to save a few keystrokes. We have short_tags and asp_tags for example that reason. These are the non-compliant tag style that people have been taught are ok for local code, but shouldn't be used for distributed code. Therefore if you really do want to save keystrokes, which I am all for, use ?=$foo? or %=$foo% and you are happy. If you ever need to distribute your code, write a 30-second sed script that changes these to ?php echo $foo? for you. That way local hacks/shortcuts stay local, but the distributed code is proper and readable and people won't be wondering what the heck this = thing is. 3. The whole concept of =$var sucks. Magic tokens with no visible meaning is against the spirit of PHP. Yes, it has snuck in due to popular demand, but I see no reason to help the disease spread any further and give people precedence for then wanting stuff like ~$foo:$bar which might echo $foo if it is non-empty, $bar otherwise. A useful operation to be sure, but we
RE: [PHP-DEV] ?= and %= both work, why not ?php=
Well some people find =~ quite readable. But this is all funky magic stuff that is simply not easy to read. For the newbie '{opentag} echo ' is much more clear than '{opentag}= '. Actually this syntax is simply more predicatable for anyone that does not use {opentag}= ' all day. So not only newbies, but also casual php programmers or people that spend a lot of their time also coding in other languages will be more happy with the '{opentag} echo ' variant. Do you dispute this fact? And this is what php is about. Otherwise we will venture into perl land and php will loose one of its keys to success. Best regards, Lukas Smith [EMAIL PROTECTED] ___ DybNet Internet Solutions GbR Reuchlinstr. 10-11 Gebäude 4 1.OG Raum 6 (4.1.6) 10553 Berlin Germany Tel. : +49 30 83 22 50 00 Fax : +49 30 83 22 50 07 www.dybnet.de [EMAIL PROTECTED] ___ -Original Message- From: Brinkman, Theodore [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 6:50 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DEV] ?= and %= both work, why not ?php= As I said. The assumption that '?php echo $var ?' is more readable than '?php= $var ?' is not universally supported. I'm not alone in finding the latter easier to read. To answer your aside, I spend alot of time writing code followed by reading and maintaining that code. I prefer the '?php' opening tag to '?' or '%', but I find '{opentag}= ' more readable than '{opentag} echo ', which means I have to either make my code harder for me to read, or I have to use tag styles which are not portable, and/or cause other issues. - Theo -Original Message- From: Lukas Smith [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 12:38 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DEV] ?= and %= both work, why not ?php= If, as you imply, '?=' and '%=' are such a horrible disease that their very existance is proof that '?php=' would be a syntactic travesty. Why were they allowed in the first place? If they were implemented due to popular demand, why is popular demand not sufficient for '?php='? I think the argument was that ?php was ment to be the standard (and therefore clean way) while ? And % is for the short hand freaks :-) Remember that one of the huge advantages of php is code readability. If you want short hand you can either use stuff like % or move over to perl. As an aside: what do you do most? Write or read/maintain code? Then think again about short hand stuff. So Rasmus's argument seems quite sound in my eyes. Best regards, Lukas Smith [EMAIL PROTECTED] ___ DybNet Internet Solutions GbR Reuchlinstr. 10-11 Gebäude 4 1.OG Raum 6 (4.1.6) 10553 Berlin Germany Tel. : +49 30 83 22 50 00 Fax : +49 30 83 22 50 07 www.dybnet.de [EMAIL PROTECTED] ___ -Original Message- From: Brinkman, Theodore [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 6:37 PM To: 'PHP Developers Mailing List' Subject: RE: [PHP-DEV] ?= and %= both work, why not ?php= Ok. #1 is the first logical, technical reason I've seen against the shorthand being fully implemented (though it begs the question why it was partially implemented in the first place). I'm not to knowledgeable about SGML specifics (and I can't afford to spend $200+ for a copy of the spec so I can spend a few weeks learning it just for this), so I can't go into that, but extending this to XML is a falacy, because PHP comparison syntax breaks the XML spec. I'm pretty sure that % echo $var % (valid PHP) would cause most XML parsers to choke. As for #2 there's no flaw with the logic until you assume that '?php echo ' is somehow inherently more readable than '?php= '. That's a matter of opinion either way. By the time you get to #3, however, you've resorted to dreaming up new unrequested language extensions, and references to 'magic' to support your argument. I, and others, would argue that '?php=' is no more 'magic' than '?php echo'. We know what it means. If you really do want some equivalent to your proposed '?php~ $foo:$bar ?', then I might suggest '?php= isset($foo)?$foo:$bar ?', which I believe would already work as '?php echo isset($foo)?$foo:$bar ?', '?= isset($foo)?$foo:$bar ?'. - Theo -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 10:42 AM To: Sam Liddicott Cc: Brinkman, Theodore; 'PHP Developers Mailing List' Subject: RE: [PHP-DEV] ?= and %= both work, why not ?php= Guys, this argument has been killed many times. Please stop. The reasons it won't change: 1. ?php is the SGML-compliant PI tag-style that is supposed to play nice with other technologies. ?php= would completely break that as the SGML spec (and the XML spec) says to use
RE: [PHP-DEV] ?= and %= both work, why not ?php=
I only dispute your contention so far as you imply that it is ALWAYS true. I never had any problem understanding what '%= ' meant when I learned ASP. When I was first learning PHP (after learning ASP), I saw many examples which used either short tag format with shortcut ('{opentag}= '), and never misunderstood that either. However, I did run into problems because I had been told that '?php' was preferred over '?' or '%' because either of those might not work on 'other' servers. So I tried '?php= ' having no reason to even *think* it wouldn't be supported because the format works on either of the 'non-preferred' tag styles. People who find '{opentag}= ' more difficult to read are not forced to use it, or the short tags. People who find '{opentag} echo ' more difficult to read are forced to either use it, or use non-portable tags. Not knowing where you're coming from with =~ I couldn't tell you what it means. As an aside: Why do the people against the inclusion of '?php= ' insist on writing it out their examples as '?php=$var?' when they don't insist on trying to write their preferred method '?phpecho$var?'? In the case of the previous I can at least tell what it is supposed to mean by skimming it. In the case of the latter, it's very hard to read and I suspect the parser would throw a fit. - Theo -Original Message- From: Lukas Smith [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 12:54 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DEV] ?= and %= both work, why not ?php= Well some people find =~ quite readable. But this is all funky magic stuff that is simply not easy to read. For the newbie '{opentag} echo ' is much more clear than '{opentag}= '. Actually this syntax is simply more predicatable for anyone that does not use {opentag}= ' all day. So not only newbies, but also casual php programmers or people that spend a lot of their time also coding in other languages will be more happy with the '{opentag} echo ' variant. Do you dispute this fact? And this is what php is about. Otherwise we will venture into perl land and php will loose one of its keys to success. Best regards, Lukas Smith [EMAIL PROTECTED] ___ DybNet Internet Solutions GbR Reuchlinstr. 10-11 Gebäude 4 1.OG Raum 6 (4.1.6) 10553 Berlin Germany Tel. : +49 30 83 22 50 00 Fax : +49 30 83 22 50 07 www.dybnet.de [EMAIL PROTECTED] ___ -Original Message- From: Brinkman, Theodore [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 6:50 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DEV] ?= and %= both work, why not ?php= As I said. The assumption that '?php echo $var ?' is more readable than '?php= $var ?' is not universally supported. I'm not alone in finding the latter easier to read. To answer your aside, I spend alot of time writing code followed by reading and maintaining that code. I prefer the '?php' opening tag to '?' or '%', but I find '{opentag}= ' more readable than '{opentag} echo ', which means I have to either make my code harder for me to read, or I have to use tag styles which are not portable, and/or cause other issues. - Theo -Original Message- From: Lukas Smith [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 12:38 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DEV] ?= and %= both work, why not ?php= If, as you imply, '?=' and '%=' are such a horrible disease that their very existance is proof that '?php=' would be a syntactic travesty. Why were they allowed in the first place? If they were implemented due to popular demand, why is popular demand not sufficient for '?php='? I think the argument was that ?php was ment to be the standard (and therefore clean way) while ? And % is for the short hand freaks :-) Remember that one of the huge advantages of php is code readability. If you want short hand you can either use stuff like % or move over to perl. As an aside: what do you do most? Write or read/maintain code? Then think again about short hand stuff. So Rasmus's argument seems quite sound in my eyes. Best regards, Lukas Smith [EMAIL PROTECTED] ___ DybNet Internet Solutions GbR Reuchlinstr. 10-11 Gebäude 4 1.OG Raum 6 (4.1.6) 10553 Berlin Germany Tel. : +49 30 83 22 50 00 Fax : +49 30 83 22 50 07 www.dybnet.de [EMAIL PROTECTED] ___ -Original Message- From: Brinkman, Theodore [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 6:37 PM To: 'PHP Developers Mailing List' Subject: RE: [PHP-DEV] ?= and %= both work, why not ?php= Ok. #1 is the first logical, technical reason I've seen against the shorthand being fully implemented (though it begs the question why it was partially implemented in the first place). I'm not to knowledgeable about SGML specifics (and I can't afford to spend $200+ for a copy of the spec so I can
Re: [PHP-DEV] ?= and %= both work, why not ?php=
Ok. #1 is the first logical, technical reason I've seen against the shorthand being fully implemented (though it begs the question why it was partially implemented in the first place). I'm not to knowledgeable about SGML specifics (and I can't afford to spend $200+ for a copy of the spec so I can spend a few weeks learning it just for this), so I can't go into that, but extending this to XML is a falacy, because PHP comparison syntax breaks the XML spec. I'm pretty sure that % echo $var % (valid PHP) would cause most XML parsers to choke. Just a guess, but when you say the alphabet, do you often say it as such: a,b,d,e,c,f,g,i... ? Your argument shows you either don't know php, or don't know how to think. The whole point of the ?php tag is to allow people to embed commands in XML documents. When short tags are disabled, commands such as % echo 'HELLO'; % don't work. If you allow ?php=? syntax, it is not valid XML, which negates the point of having ?php in the first place. As for #2 there's no flaw with the logic until you assume that '?php echo ' is somehow inherently more readable than '?php= '. That's a matter of opinion either way. Perhaps if it were a computer making these assumptions, yes. But anyone with half a brain can see that ?php echo 'Hello'; ? is much easer to understand for someone with no programming experience, than: ?php='Hello'?. By the time you get to #3, however, you've resorted to dreaming up new unrequested language extensions, and references to 'magic' to support your argument. I, and others, would argue that '?php=' is no more 'magic' than '?php echo'. We know what it means. If, as you imply, '?=' and '%=' are such a horrible disease that their very existance is proof that '?php=' would be a syntactic travesty. Why were they allowed in the first place? If they were implemented due to popular demand, why is popular demand not sufficient for '?php='? 42 If you really do want some equivalent to your proposed '?php~ $foo:$bar ?', then I might suggest '?php= isset($foo)?$foo:$bar ?', which I believe would already work as '?php echo isset($foo)?$foo:$bar ?', '?= isset($foo)?$foo:$bar ?'. Thanks for the tip, we didn't realize that. -Sterling -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
Why are short tags (? ? and % %) such a bad thing? Why does the PHP formatting (tags) matter in terms of SGML XML? Not that it matters, but personally I prefer to use the short tags ? and ? because it's less code for me to write, it fits nicely into my HTML, and I find ?= much easier to read than ?php echo. I honestly don't really care for ?php= , although I do understand the reasoning behind it and agree with the consistency argument for it. - Gabriel -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
At 21:07 26/04/2002, Sterling Hughes wrote: The whole point of the ?php tag is to allow people to embed commands in XML documents. When short tags are disabled, commands such as % echo 'HELLO'; % don't work. If you allow ?php=? syntax, it is not valid XML, which negates the point of having ?php in the first place. He was wrong about the 2nd example, but I'm pretty sure about his first: ?php if ($foo $bar) ... ? Is this valid XML? [I'm not taking sides on whether ?php= should be supported or not] Zeev -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
At 20:32 26/04/2002, Gabriel Ricard wrote: Why are short tags (? ? and % %) such a bad thing? % % are bad because they're not supported on most setups. ? ? are not good enough because they're not supported on all setups, even though they're supported on most. As to why they're not supported on all - please refer to the huge threads about the subject, that date back to 1997 or 1998 :) Zeev -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
Perhaps if it were a computer making these assumptions, yes. But anyone with half a brain can see that ?php echo 'Hello'; ? is much easer to understand for someone with no programming experience, than: ?php='Hello'?. Agreed, Sterling. I can't understand why this is so difficult to realize. Theo, are you just trying to impress people by saying how easy the cryptic syntax is? If so, it's not working. I, and others, would argue that '?php=' is no more 'magic' than '?php echo'. We know what it means. Seriously, Theo, this list isn't a place where everyone's ego is on the line. This is like arguing that the ternary operator in C is more intuitive than just writing the long if statement. Just because you and others know what it means is *not* a valid argument. This isn't a contest. You seem to have gotten the wrong impression. I for one am glad that PHP has remained as clean as it is. It is certainly a factor in PHP's success. Thanks for the tip, we didn't realize that. Well, Sterling, the sarcasm might have ben a bit harsh, but I must admit I laughed out loud when I read it. :) It's too bad really that ?= and %= are valid. I can guess why, but it leads to useless conversations like this. Chris -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
?php if ($foo $bar) ... ? Is this valid XML? No, this is technically invalid XML. You would have to write it as: ?php if ($foo gt; $bar) But sheez... That's just way too ugly, you can work around it and there are other examples out there of people breaking this rule. Doing ?php= is a much more flagrant violation in my opinion. -Rasmus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
On Fri, 26 Apr 2002, Gabriel Ricard wrote: Why are short tags (? ? and % %) such a bad thing? They aren't really bad. It's just that they are optional and if you distribute your code to run on someone else's PHP setup they may be turned off. If you have full control over your PHP setup anywhere the code you write will run, then using these tags is perfectly fine. Why does the PHP formatting (tags) matter in terms of SGML XML? It rarely does, but people worry that they may want to pass a PHP file through an XML parser or that they want to pass raw XHTML files through the PHP parser. In these cases it would matter. -Rasmus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
I'm pretty sure it is. It parses fine according to Xerces, at any rate. At first, I was thinking the greater than comparison would cause problems, as xsl:if elements like seeing the test written as foo gt; bar, but when you have the symbol inside of a processing instruction, it's fine. J Zeev Suraski wrote: At 21:07 26/04/2002, Sterling Hughes wrote: The whole point of the ?php tag is to allow people to embed commands in XML documents. When short tags are disabled, commands such as % echo 'HELLO'; % don't work. If you allow ?php=? syntax, it is not valid XML, which negates the point of having ?php in the first place. He was wrong about the 2nd example, but I'm pretty sure about his first: ?php if ($foo $bar) ... ? Is this valid XML? [I'm not taking sides on whether ?php= should be supported or not] Zeev -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
I'm pretty sure it is. It parses fine according to Xerces, at any rate. At first, I was thinking the greater than comparison would cause problems, as xsl:if elements like seeing the test written as foo gt; bar, but when you have the symbol inside of a processing instruction, it's fine. Are you sure? I know that this is a common thing for XML parsers to allow, but I think going strictly by the spec it is not valid. I could be wrong though, my XML spec-reading patience has long since worn off. -Rasmus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
This might not matter too much now, but conforming to XML standards might matter eventually. Let's say in a year or two, somebody decides to write a PHP module for an XML/XSL processor. (Something like XSP using Apache's Cocoon.) Basically, these processors take in some XML, look for processing instructions, create some output based on what they find, pass the output through an XSL transformation and spit out some other format, like HTML. If PHP doesn't work well with XML, this is going to be a mess. (I seem to remember hearing about such a module for Cocoon, which they call producers. It would be kind of cool to have a PHP procuder, which I'd prefer over the standard Cocoon producer, Java.) J p.s. and OT -- it would be pretty cool if the XSLT extension for PHP was able to process the XML/XSL before it passed it off to the actual XSLT processor, i.e. look through the XML or XSL for PHP processing instructions encased in ?php ... ? and actually evaluate them before the transformation. That might be something cool to look into. (I use the XSLT extension quite a bit, and this would definitely be useful. For now, I eval() the XML/XSL and buffer it before sending it to the XSLT processor.) Gabriel Ricard wrote: Why are short tags (? ? and % %) such a bad thing? Why does the PHP formatting (tags) matter in terms of SGML XML? Not that it matters, but personally I prefer to use the short tags ? and ? because it's less code for me to write, it fits nicely into my HTML, and I find ?= much easier to read than ?php echo. I honestly don't really care for ?php= , although I do understand the reasoning behind it and agree with the consistency argument for it. - Gabriel -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
Are you positive about that? I would have assumed so, too, but it passes both the Sablotron and Xerces XML processors without so much as a warning. J Rasmus Lerdorf wrote: ?php if ($foo $bar) ... ? Is this valid XML? No, this is technically invalid XML. You would have to write it as: ?php if ($foo gt; $bar) But sheez... That's just way too ugly, you can work around it and there are other examples out there of people breaking this rule. Doing ?php= is a much more flagrant violation in my opinion. -Rasmus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
I hear that. Not that reading specs and standards isn't fun... J Rasmus Lerdorf wrote: I'm pretty sure it is. It parses fine according to Xerces, at any rate. At first, I was thinking the greater than comparison would cause problems, as xsl:if elements like seeing the test written as foo gt; bar, but when you have the symbol inside of a processing instruction, it's fine. Are you sure? I know that this is a common thing for XML parsers to allow, but I think going strictly by the spec it is not valid. I could be wrong though, my XML spec-reading patience has long since worn off. -Rasmus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
Ok, cool, so as long as we don't do something stupid like add ?php= then we are XML-clean. Well, in the language anyway. People could still write ?php echo ?? I suppose. -Rasmus On Fri, 26 Apr 2002 [EMAIL PROTECTED] wrote: From: http://www.w3.org/TR/2000/REC-xml-20001006#sec-pi [16] PI ::='?' PITarget (S (Char* - (Char* '?' Char*)))? '?' [17] PITarget ::=Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) [3] S::=(#x20 | #x9 | #xD | #xA)+ [2] Char ::=#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x1-#x10] Meaning that between ?php and ? everytning is allowed but '?'. Derick On Fri, 26 Apr 2002, J Smith wrote: Are you positive about that? I would have assumed so, too, but it passes both the Sablotron and Xerces XML processors without so much as a warning. J Rasmus Lerdorf wrote: ?php if ($foo $bar) ... ? Is this valid XML? No, this is technically invalid XML. You would have to write it as: ?php if ($foo gt; $bar) But sheez... That's just way too ugly, you can work around it and there are other examples out there of people breaking this rule. Doing ?php= is a much more flagrant violation in my opinion. -Rasmus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php --- Did I help you? Consider a gift: http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B --- PHP: Scripting the Web - [EMAIL PROTECTED] All your branches are belong to me! SRM: Script Running Machine - www.vl-srm.net --- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
Just read that myself at w3c.org. I hate the format of their recommendations, god. It takes forever for me to find anything specific in their specs. J [EMAIL PROTECTED] wrote: From: http://www.w3.org/TR/2000/REC-xml-20001006#sec-pi [16] PI ::='?' PITarget (S (Char* - (Char* '?' Char*)))? '?' [17] PITarget ::=Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) [3] S::=(#x20 | #x9 | #xD | #xA)+ [2] Char ::=#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [[#x1-#x10] Meaning that between ?php and ? everytning is allowed but '?'. Derick On Fri, 26 Apr 2002, J Smith wrote: Are you positive about that? I would have assumed so, too, but it passes both the Sablotron and Xerces XML processors without so much as a warning. J -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
Hi, From: http://www.w3.org/TR/2000/REC-xml-20001006#sec-pi [16] PI ::='?' PITarget (S (Char* - (Char* '?' Char*)))? '?' [17] PITarget ::=Name - (('X' | 'x') ('M' | 'm') ('L' | 'l')) [3] S::=(#x20 | #x9 | #xD | #xA)+ [2] Char ::=#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x1-#x10] Meaning that between ?php and ? everytning is allowed but '?'. Nice to know! Not that it matters to the ?php= discussion, because if someone doesn't want to make a valid XML document he has plenty ways of doing that... About the ?php= thing: IMHO it can be put in, because the people who don't like it just won't use it... I understand that others want to keep the language clean, which is very important too! I probably wouldn't use it, but I have nothing against it either. But: very nice to know the XML thing. Thanks! Sander. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
At 20:52 26/04/2002, Rasmus Lerdorf wrote: ?php if ($foo $bar) ... ? Is this valid XML? No, this is technically invalid XML. You would have to write it as: ?php if ($foo gt; $bar) Erm, but that won't work :) But sheez... That's just way too ugly, you can work around it and there are other examples out there of people breaking this rule. Doing ?php= is a much more flagrant violation in my opinion. Look, I'm not trying to argue in favour of ?php= or anything. I'm just going back to this discussion from 5 years ago, and pointing out that I still don't quite understand why we cared about XML compliance, when a language such as PHP cannot be XML compliant no matter what :) Zeev -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
?php if ($foo gt; $bar) Erm, but that won't work :) Obviously. But sheez... That's just way too ugly, you can work around it and there are other examples out there of people breaking this rule. Doing ?php= is a much more flagrant violation in my opinion. Look, I'm not trying to argue in favour of ?php= or anything. I'm just going back to this discussion from 5 years ago, and pointing out that I still don't quite understand why we cared about XML compliance, when a language such as PHP cannot be XML compliant no matter what :) It looks like we can. I was assuming the SGML characteristics for XML and it looks like I was wrong. A '' is ok inside the ?php ? tags. -R -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
At 03:18 27/04/2002, Rasmus Lerdorf wrote: It looks like we can. I was assuming the SGML characteristics for XML and it looks like I was wrong. A '' is ok inside the ?php ? tags. Ok, so that's actually useful. But it sounds odd - XML is not SGML compliant? Zeev -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
I'm pretty sure that XML is a scaled down and easier to learn/work with version of SGML Correct me if I'm wrong --Andrew On Friday 26 April 2002 07:30 pm, Zeev Suraski wrote: At 03:18 27/04/2002, Rasmus Lerdorf wrote: It looks like we can. I was assuming the SGML characteristics for XML and it looks like I was wrong. A '' is ok inside the ?php ? tags. Ok, so that's actually useful. But it sounds odd - XML is not SGML compliant? Zeev -- 35. I think we can plug just one more thing in to this outlet strip with out triping the breaker. --Top 100 things you don't want the sysadmin to say -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
Yes, but I thought it was SGML compliant (as in, some sort of a subset of SGML with lots of predefined rules, but still, falls into the SGML language category). But then, I could very well be wrong about this. Zeev At 05:37 27/04/2002, Andrew Lindeman wrote: I'm pretty sure XML is a scaled down and easier to learn/work with version of SGML. Correct me if I'm wrong --Andrew On Friday 26 April 2002 07:30 pm, Zeev Suraski wrote: At 03:18 27/04/2002, Rasmus Lerdorf wrote: It looks like we can. I was assuming the SGML characteristics for XML and it looks like I was wrong. A '' is ok inside the ?php ? tags. Ok, so that's actually useful. But it sounds odd - XML is not SGML compliant? Zeev -- We all know Linux is great...it does infinite loops in 5 seconds. (Linus Torvalds about the superiority of Linux on the Amterdam Linux Symposium) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
On Thu, 2002-04-25 at 15:27, Brinkman, Theodore wrote: Ok. I have the feeling that I'm going to be making myself a bit unpopular here with my first post, but I mean no offense or disrespect. I'm just trying to understand something. PHP allows ?= if short tags are enabled, or %= if asp-style tags are enabled, but doesn't allow ?php=. Why? I went so far as to look into the source and as near as I can tell without getting my hands on a C compiler, changing it so that the '{opentag}=' format was equivalent to '{opentag} echo' would take a 2 line patch to one file. I submitted this change as a feature request in the bug system (#16763), and got the incredibly informative and helpful response of this was discussed to death on php-dev. it's not going to happen. 17 minutes later. I've spent the next 2 days trying to hunt down any mention of it, and having no luck because searching for ?php=, or ?php= turns up no results. So in an effort to understand why and how the decision was made to leave a feature partially implemented, I'm left with no resort except to post here and probably bring down a can of whoop-ass on myself. My appologies to anyone who is sick of this being discussed. That said. Why? - Theo One long discussion starts here: http://marc.theaimsgroup.com/?l=php-devm=100405792100833w=2 It looks like consistency was voted down because someone might misread ?php=$var to mean ?$php=$var. Which doesn't seem much worse than the age-old '=' vs. '==' screwup. Anyway, there's the thread and you should read it and decide whether this needs to get going again. :) -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] ?= and %= both work, why not ?php=
Well, having read that thread (thank you), I tallied up the votes (where I could tell what the vote was) and it was 13 for, 3 against, 2 undecided/don't care. Of the unsure, one person voted against, then undecided, then for, the other voted don't care, then against. Of the against, one voted against purely on stylistic reasons. Why wasnt' this change implemented? It's not a feature anyone would be forced to use, it improves syntax consistency, and the feeling from that discussion was overwhelmingly for the change. - Theo -Original Message- From: Lars Torben Wilson [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 6:40 PM To: Brinkman, Theodore Cc: 'PHP Developers Mailing List' Subject: Re: [PHP-DEV] ?= and %= both work, why not ?php= On Thu, 2002-04-25 at 15:27, Brinkman, Theodore wrote: Ok. I have the feeling that I'm going to be making myself a bit unpopular here with my first post, but I mean no offense or disrespect. I'm just trying to understand something. PHP allows ?= if short tags are enabled, or %= if asp-style tags are enabled, but doesn't allow ?php=. Why? I went so far as to look into the source and as near as I can tell without getting my hands on a C compiler, changing it so that the '{opentag}=' format was equivalent to '{opentag} echo' would take a 2 line patch to one file. I submitted this change as a feature request in the bug system (#16763), and got the incredibly informative and helpful response of this was discussed to death on php-dev. it's not going to happen. 17 minutes later. I've spent the next 2 days trying to hunt down any mention of it, and having no luck because searching for ?php=, or ?php= turns up no results. So in an effort to understand why and how the decision was made to leave a feature partially implemented, I'm left with no resort except to post here and probably bring down a can of whoop-ass on myself. My appologies to anyone who is sick of this being discussed. That said. Why? - Theo One long discussion starts here: http://marc.theaimsgroup.com/?l=php-devm=100405792100833w=2 It looks like consistency was voted down because someone might misread ?php=$var to mean ?$php=$var. Which doesn't seem much worse than the age-old '=' vs. '==' screwup. Anyway, there's the thread and you should read it and decide whether this needs to get going again. :) -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ?= and %= both work, why not ?php=
Why wasnt' this change implemented? It's not a feature anyone would be forced to use, it improves syntax consistency, and the feeling from that discussion was overwhelmingly for the change. All animals are equal, but some animals are more equal than others. George Orwell (1903-1950) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] ?= and %= both work, why not ?php=
On Thu, 25 Apr 2002, Brinkman, Theodore wrote: Well, having read that thread (thank you), I tallied up the votes (where I could tell what the vote was) and it was 13 for, 3 against, 2 undecided/don't care. Of the unsure, one person voted against, then undecided, then for, the other voted don't care, then against. Of the against, one voted against purely on stylistic reasons. Why wasnt' this change implemented? It's not a feature anyone would be forced to use, it improves syntax consistency, and the feeling from that discussion was overwhelmingly for the change. It's invalid XML, ?php= is not a valid processing tag. Derick -Original Message- From: Lars Torben Wilson [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 6:40 PM To: Brinkman, Theodore Cc: 'PHP Developers Mailing List' Subject: Re: [PHP-DEV] ?= and %= both work, why not ?php= On Thu, 2002-04-25 at 15:27, Brinkman, Theodore wrote: Ok. I have the feeling that I'm going to be making myself a bit unpopular here with my first post, but I mean no offense or disrespect. I'm just trying to understand something. PHP allows ?= if short tags are enabled, or %= if asp-style tags are enabled, but doesn't allow ?php=. Why? I went so far as to look into the source and as near as I can tell without getting my hands on a C compiler, changing it so that the '{opentag}=' format was equivalent to '{opentag} echo' would take a 2 line patch to one file. I submitted this change as a feature request in the bug system (#16763), and got the incredibly informative and helpful response of this was discussed to death on php-dev. it's not going to happen. 17 minutes later. I've spent the next 2 days trying to hunt down any mention of it, and having no luck because searching for ?php=, or ?php= turns up no results. So in an effort to understand why and how the decision was made to leave a feature partially implemented, I'm left with no resort except to post here and probably bring down a can of whoop-ass on myself. My appologies to anyone who is sick of this being discussed. That said. Why? - Theo One long discussion starts here: http://marc.theaimsgroup.com/?l=php-devm=100405792100833w=2 It looks like consistency was voted down because someone might misread ?php=$var to mean ?$php=$var. Which doesn't seem much worse than the age-old '=' vs. '==' screwup. Anyway, there's the thread and you should read it and decide whether this needs to get going again. :) -- Torben Wilson [EMAIL PROTECTED] http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php --- Did I help you? Consider a gift: http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B --- PHP: Scripting the Web - [EMAIL PROTECTED] All your branches are belong to me! SRM: Script Running Machine - www.vl-srm.net --- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php