Re: [PHP] PEAR Standards (was Re: equivalent of asp's %= strTest %)
On Sat, Apr 07, 2001 at 10:19:04PM -0500, Plutarck wrote: For instance, when they say not to use 4 spaces (or was it 3?) instead of tabs? I think that's stupid, and I don't do it. But they did it for a reason, even if I don't understand it. tabs might break going from one platform to another, thus making the code hard to read. 4 spaces stay 4 spaces. on every platform. That's probably the reason. -fkr, who is the only one that uses spaces instead of tabs at work -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE | |all your base are belong to us | shame on me | fkr@IRCnet | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PEAR Standards (was Re: equivalent of asp's %= strTest %)
I have some problems with the PEAR "standards", and I'm wondering what others have to say about what the PHP developers are doing to overcome PHP's obvious shortcomings. bitch moan It seems that one obvious improvement to be made to PHP would be the implementation of real namespaces. It seems pretty simple to implement this and stay backwards compatible with PHP3/4. Does anyone know if plans are in the work for this? The PEAR standards try to make up for the lack of namespaces . . . and I suppose its the best that can be done, but it's simply awful! It not only proposes a standard, it proposes to mandate naming conventions and coding style as well! I think the PHP developers should look to the example that Perl has set for graceful, non-obtrusive namespaces that don't enforce coding style or naming conventions for classes. (I mean, I don't have to name a subclass of "DB" "DB_mysql" -- it can be "DB::Mysql".) /moan /bitch "Michael Kimsal" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... If the people defining the PEAR standards really were that interested in standards, why include alternate ways of doing something? ?=$blah;? And if the 'short tag' method is useful enough for people, why 'exclude' it from a standard? This notion of 'PEAR standards' does irk me some, because it's been so long in coming, and people are deferring to it before it's a reality. First of all, I think that the PEAR folk are on a different endeavor than the PHP developers. The PEAR people seem to be trying to propose a good standard for a language that needs some improvement. They're doing a decent job, but I think PEAR should wait till PHP matures a bit. Second, there is one very good reason not to use short tags: XML. All the same, I'd rather just enable ASP tags than do away with short tags, as short tags are irreplacable in templates rich in content and sparse on code. My $0.02. Dean Hall. http://hall.apt7.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PEAR Standards (was Re: equivalent of asp's %= strTest%)
If the people defining the PEAR standards really were that interested in standards, why include alternate ways of doing something? ?=$blah;? And if the 'short tag' method is useful enough for people, why 'exclude' it from a standard? This notion of 'PEAR standards' does irk me some, because it's been so long in coming, and people are deferring to it before it's a reality. First of all, I think that the PEAR folk are on a different endeavor than the PHP developers. The PEAR people seem to be trying to propose a good standard for a language that needs some improvement. They're doing a decent job, but I think PEAR should wait till PHP matures a bit. Second, there is one very good reason not to use short tags: XML. All the same, I'd rather just enable ASP tags than do away with short tags, as short tags are irreplacable in templates rich in content and sparse on code. I'm not sure why XML is an issue. Does XML use the ? in it's syntax? XML tags are, to my knowledge, of the blahblah/ style. Am I missing something? I admit it's been a bit since I've gotten into dealing with XML at any real in-depth level, but the short tags in PHP don't seem like they'd be a problem. If they're a problem for PHP, I think a lot of ASP shops will be caught short when dealing with XML. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PEAR Standards (was Re: equivalent of asp's %= strTest %)
"Michael Kimsal" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm not sure why XML is an issue. Does XML use the ? in it's syntax? XML tags are, to my knowledge, of the blahblah/ style. Am I missing something? I admit it's been a bit since I've gotten into dealing with XML at any real in-depth level, but the short tags in PHP don't seem like they'd be a problem. If they're a problem for PHP, I think a lot of ASP shops will be caught short when dealing with XML. ?xml version="1.0"? This is the first line of an XML file. Including XML files from PHP scripts will be a real problem if short tags are enabled. Dean Hall. http://hall.apt7.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PEAR Standards (was Re: equivalent of asp's %= strTest%)
On Sat, 7 Apr 2001, Dean Hall wrote: "Michael Kimsal" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm not sure why XML is an issue. Does XML use the ? in it's syntax? XML tags are, to my knowledge, of the blahblah/ style. Am I missing something? I admit it's been a bit since I've gotten into dealing with XML at any real in-depth level, but the short tags in PHP don't seem like they'd be a problem. If they're a problem for PHP, I think a lot of ASP shops will be caught short when dealing with XML. ?xml version="1.0"? This is the first line of an XML file. Including XML files from PHP scripts will be a real problem if short tags are enabled. Dean Hall. http://hall.apt7.com DUH! :( Why did those pesky XML people have to do that??? All of that cool header stuff is stuff I normally skip - like the ISO charset stuff that WYSIWYG editors are fond of putting at the top of every file they create. :) And oh yeah, I realized my ASP comment mistake about 4 seconds after hitting send... Not a good mailing day for me today! ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PEAR Standards (was Re: equivalent of asp's %= strTest %)
I'm pretty sure you can make php use the asp style % though too, not sure if that's for short tags, regular tags or both, I know it's in the config though, anyone know? Shaun On Saturday 07 April 2001 18:46, Michael Kimsal wrote: On Sat, 7 Apr 2001, Dean Hall wrote: "Michael Kimsal" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm not sure why XML is an issue. Does XML use the ? in it's syntax? XML tags are, to my knowledge, of the blahblah/ style. Am I missing something? I admit it's been a bit since I've gotten into dealing with XML at any real in-depth level, but the short tags in PHP don't seem like they'd be a problem. If they're a problem for PHP, I think a lot of ASP shops will be caught short when dealing with XML. ?xml version="1.0"? This is the first line of an XML file. Including XML files from PHP scripts will be a real problem if short tags are enabled. Dean Hall. http://hall.apt7.com DUH! :( Why did those pesky XML people have to do that??? All of that cool header stuff is stuff I normally skip - like the ISO charset stuff that WYSIWYG editors are fond of putting at the top of every file they create. :) And oh yeah, I realized my ASP comment mistake about 4 seconds after hitting send... Not a good mailing day for me today! ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PEAR Standards (was Re: equivalent of asp's %= strTest %)
(Reply to your TOFU:) "shaun" [EMAIL PROTECTED] wrote in message 01040817181702.01567@box">news:01040817181702.01567@box... I'm pretty sure you can make php use the asp style % though too, not sure if that's for short tags, regular tags or both, I know it's in the config though, anyone know? Shaun Yeah, ASP tags are all short, I believe. There is no long version. (Okay, I'm not completely sure, but pretty sure.) Dean. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PEAR Standards (was Re: equivalent of asp's %= strTest%)
"shaun" [EMAIL PROTECTED] wrote : I'm pretty sure you can make php use the asp style % though too, not sure if that's for short tags, regular tags or both, I know it's in the config though, anyone know? Info related to the above can be seen here : http://www.php.net/manual/en/language.basic-syntax.php http://www.php.net/manual/en/configuration.php#ini.asp-tags Regarding PEAR standards, I think they're good to teach. For instance, imagine if all written PHP books and tutorials followed such a standard, would that be cool? Yes. From there us PHP minions can do as we choose. A related article is as such (see user comments too) : http://phpbuilder.com/columns/tim20010101.php3 Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PEAR Standards (was Re: equivalent of asp's %= strTest %)
As long as PEAR standars are enforced ONLY for the PEAR library, then it's ok. It makes it alot easier to read such code if all of it's contents use the same style. But when they try to reach over and make all applications do it, then it's too far. But I don't see them trying to do that. When PEAR says not to use short-tags, they aren't saying it just becase they "prefer that style". They say it for this exact reason. The standard tags work great with XML, but with short tags xml may break. ASP tags should be avoided, because what if your application get's installed on a server that supports ASP? So your PHP code get's passed to an ASP parser, and it gets all confused, and it could accidentally totally screw up your app and open a security hole. Don't look at PEAR as trying to set standards for _you_. Look at the standards as for PEAR library content, and ask why they say such things. For instance, when they say not to use 4 spaces (or was it 3?) instead of tabs? I think that's stupid, and I don't do it. But they did it for a reason, even if I don't understand it. I will abide by it if I want my stuff included in PEAR, but in my own apps I keep using tabs (it's easier to use backspace/delete on a tab, for one thing). PEAR servers a valuable role as instructor. You may never have thought there was a reason to add that extra "php" on your opening tag, but now you know why they reccommend it ;) Let's not try and restrict what the developers of an entirely seperate standard (XML) do with their code just so we can avoid writing our code like it was intended to be written :) As long as PEAR is a restriction on PEARlib content, and just a suggestion to everyone else, then PEAR is great. If PEAR trys to force me to use their standards in my programming in any way, then they've become "code police", and we sure as heck don't need that. Remember, PHP is a "loosely typed" language. That's why I like it. However I often treat it as strictly typed to ensure I don't create any errors, but I like having that choice to just be "loose". Ya know? -- Plutarck Should be working on something... ...but forgot what it was. ""Dean Hall"" [EMAIL PROTECTED] wrote in message 9ao32a$n7v$[EMAIL PROTECTED]">news:9ao32a$n7v$[EMAIL PROTECTED]... I have some problems with the PEAR "standards", and I'm wondering what others have to say about what the PHP developers are doing to overcome PHP's obvious shortcomings. bitch moan It seems that one obvious improvement to be made to PHP would be the implementation of real namespaces. It seems pretty simple to implement this and stay backwards compatible with PHP3/4. Does anyone know if plans are in the work for this? The PEAR standards try to make up for the lack of namespaces . . . and I suppose its the best that can be done, but it's simply awful! It not only proposes a standard, it proposes to mandate naming conventions and coding style as well! I think the PHP developers should look to the example that Perl has set for graceful, non-obtrusive namespaces that don't enforce coding style or naming conventions for classes. (I mean, I don't have to name a subclass of "DB" "DB_mysql" -- it can be "DB::Mysql".) /moan /bitch "Michael Kimsal" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... If the people defining the PEAR standards really were that interested in standards, why include alternate ways of doing something? ?=$blah;? And if the 'short tag' method is useful enough for people, why 'exclude' it from a standard? This notion of 'PEAR standards' does irk me some, because it's been so long in coming, and people are deferring to it before it's a reality. First of all, I think that the PEAR folk are on a different endeavor than the PHP developers. The PEAR people seem to be trying to propose a good standard for a language that needs some improvement. They're doing a decent job, but I think PEAR should wait till PHP matures a bit. Second, there is one very good reason not to use short tags: XML. All the same, I'd rather just enable ASP tags than do away with short tags, as short tags are irreplacable in templates rich in content and sparse on code. My $0.02. Dean Hall. http://hall.apt7.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]