At 23:10 19/3/2001, Phil Driscoll wrote:
> >isset() is not an internal function but a language construct. I disagree on
> >the "using additional arguments for other stuff part". It's often very
> >weird that functions behave differently according to the way they are
>I've just done a quick count of the php functions which take an optional
>extra argument to change their behaviour, and I stopped when I reached 100.
Define 'change their behavior' though? Almost all SQL functions take an
optional argument which is the link id. That is by design, and doesn't
really mean anything here, and it's not really changing their behavior, but
rather, giving more fine-grained arguments. The number of functions that
were added an extra argument after at a later stage (as opposed to their
time of writing) is very small. The number of functions that were added an
extra argument that really changes their behavior is pretty much negligible
>Fair enough, isset is a language construct, but most of the other
>isblahs/ext_isblahs are functions, however your average php programmer won't
>even know what this means, let alone be able to discriminate.
It doesn't really matter. Let's say you suggested isset($var[, $reverse])
syntax, which will hint isset() whether to reverse its result or not. Who
says whether it's a good idea to 'waste' this 2nd argument on this
purpose? The way I see it, supporting more than one variable in isset() is
very useful for users, and keeping it the way it was just to accommodate
for possible extra arguments in the future that may or may not come doesn't
make much sense and isn't justified.
>My point is that if you are going to do it to isset, AND the language is to
>become more orthogonal then it MUST also be done to isanythingelse. I can
>see that there are no nasty repercussions with using the technique for
>isset, however there are many many isanythingelses and I'd be surprised if
>we can apply the
>reasoning across the board.
What do you mean by making the language orthogonal? You mean consistent?
PHP Development 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]