Stanislav Malyshev wrote:
> Hi!
> 
>> For me they are ways to "package up" code without interfering with built
>> in PHP functions or other libraries I wish to use.
> 
> Right, I agree.
> 
>> I don't want to retrain myself or others to call all functions in my
>> code as though they were static methods.  I want to be able to have
> 
> Here I disagree. I don't think you can both work in terms of multi-space
> and not expect to have at least a slight change of mindset when using
> multi-space. I think this would only lead you into trouble - suppose one
> day you'd want to use two libraries and each of them has its own
> definition of _()? You'd get there eventually - so maybe we better start
> thinking right from the start.

And what happens when you have two libraries and each has their own Date
implementation? How is that any different? If you could alias in
functions, you'd simply alias them in differently - call one _() and one
  new_gettext - that's the point of aliasing, to avoid collisions

> 
>> functions with the same names as php functions without prefixing or
>> other extra typing - not because it saves keystrokes, but because it's
>> confusing - is that a function call or a method call?
> 
> For me, I think it's much more confusing to have strlen() mean 10
> different things than have Foo::strlen() and Bar::strlen(). And I do not
> see any substantial difference between "function call" and "static
> method call" - for me, it's just as similar as "one-argument function
> call" and "two-argument function call".
> I guess it is also a matter of personal coding style...

Actually I don't do a lot of coding with functions at all, but I have
been soliciting other's opinions on the subject of namespace use, and
was challenged to create an application using two namespaced functional
libraries.  Let's just say it was an eye opening experience, and where
my opinion that functions in namespace are essentially useless came from
, since it forces procedural coders to totally alter the way they're
accustomed to writing code.

Thanks
Elizabeth

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to