Experience/Function Aliases (Was:Re: [PHP-DEV] PHP File Upload Security Hole - Still No Fix?
| From: | Ron Chmara | Date: | Thu, 07 Sep 2000 03:59:17 +0000 |
| Subject: | Experience/Function Aliases (Was:Re: [PHP-DEV] PHP File Upload Security Hole - Still No Fix? | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-32481@lists.php.net to get a copy of this message | ||
Jon Ribbens wrote:
> James Moore <jmoore@php.net> wrote:
> > If you were one of the senior developers over at MySQL or PgSQL or anyother
> > OS project then Im sure your opinion would be of more value,
> Why? Why would my opinion be of any more value if I was the Lord High
> Poobar of Open Source? You might decide that since I was so eminent you
> would be more likely to take my words at face value without investigating
> them further, but my opinions themselves wouldn't be worth any more.
Nah, I doubt it.
I think, however, that if you were in the trenches on a similar project,
being blasted from people you don't know, about code you didn't neccesarrily
write, that your outlook, your temperance, might be a bit different.
As is stands, it's hard to figure out whether or not you've truly pondered
the ramifications of all of your suggestions (as a software architect must),
or if you are making off-the-cuff feature requests, which may have unexpected
side effects...
When it's a small team, a small project, it's easy to debug, to write
code, to create new features, to rapidly expand the language... but once
a project becomes more successful, it becomes a lot harder co-ordinating
documentation, new features, bug-hunts, security, etc. etc.
A simple variable change or function change goes from an issue that may
have affected 20 friends, to something blasted all over Bugtraq, slashdot,
etc., etc., and will get you flamed on email lists, you'll have to deal
with disgruntled users who "wanted the old way" arguing with "but the
new way is better!"..
So much more temperance is needed.
I, for example, don't have what it takes (yet) to lead a project this big. I know
that, and don't pretend otherwise. I've criticised Stas, Andi, & Zeev, but
this is open source... I can't complain about the documentation anymore. :-)
If you want to do it better, you *can*. People may fight, but if your ideas
are good, (for whatever reason), they can rise to the top, if you let them,
and don't obscure them too much with infighting.
-=-
One good idea I saw (that you might want to submit as a feature request)
is a way to make a function 'alias' instance for the life of a script. That way,
you could call your standard header at the beginning of a script, and
use quick coding for the rest of the script. You can currently do this
by writing your own functions, but it seems like this could come in
handy for _everyone_, regardless of the functions they used most
frequently (with less coding than a function). It wouldn't expand the
neccesary documentation load, could be rolled into any forward version,
etc, and might(?) fit quite well into the pre-parsing already done by the
Zend code.
Such as:
myaliases.inc----
/* may need to put some special "flag" char in front
* so they are picked up easily, such as ~, as in "~htment()"
*/
alias (htmlentities, htment)
alias (get_html_translation_table, ghtt)
alias (quoted_printable_decode, qpd)
---
And then you could use the functions as you normally would, with the shorter
names.... I think you were _trying_ to say this, but it was obscured in
demands, insults, etc. :-(
Zend might (I'm in pure conjecture here, guys, so smack me down if it's off)
be able to not worry about whether or not it was used _until_ it encountered
an 'alias' function, and then it's a simple replacement routine when it
encountered the shortcut/alias to the function... heck, I think this is
part of the beauty of the Zend engine pre-scanning, that it can _do_ things like
this, right?
This gets everybody their desired shortcuts, without sacrificing time or
effort on which ones are the most neeeded/valuable to a given coder.
-Bop
--
Brought to you from iBop the iMac, a MacOS, Win95, Win98, LinuxPPC machine,
which is currently in MacOS land. Your bopping may vary.