Re: PEAR Standards (was Re: equivalent of asp's <%= strTest %>)

From: Date: Sun, 08 Apr 2001 03:19:04 +0000
Subject: Re: PEAR Standards (was Re: equivalent of asp's <%= strTest %>)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-47618@lists.php.net to get a copy of this message
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"" <hall@apt7.com> wrote in message news:9ao32a$n7v$1@toye.p.sourceforge.net... > 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" <michael@tapinternet.com> wrote in message > news:3ACF4794.86A78371@tapinternet.com... > > > 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: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#47618) next »