Re: [PHP-DEV] Importing namespaced functions

2013-04-21 Thread Igor Wiedler
Let me give you two specific cases where I think importing a function significantly improves the readability of code. A) Tiny libraries I recently released a "library" that really just consists of two functions. Those functions are named compose() and pipeline(), and the library is named "igorw/c

Re: [PHP-DEV] Importing namespaced functions

2013-04-20 Thread Igor Wiedler
> What's wrong with referencing one part of it? It can be as short as two > characters, and an an added bonus you won't suddenly have your strlen > overridden by somebody without you knowing it. Functions live in global > space, and there's a real lot of them, that's why importing them wasn't > con

Re: [PHP-DEV] Importing namespaced functions

2013-04-19 Thread Christoph Rosse
On 19.04.2013 08:19, Stas Malyshev wrote: Hi! One of the shortcomings of namespaced functions in PHP is that it is not possible to import them as you can do with classes and namespaces. For code that is not in the same namespace as the function, you must always reference at least one part of th

Re: [PHP-DEV] Importing namespaced functions

2013-04-18 Thread Stas Malyshev
Hi! > One of the shortcomings of namespaced functions in PHP is that it is > not possible to import them as you can do with classes and > namespaces. For code that is not in the same namespace as the > function, you must always reference at least one part of the > namespace in order to call it. W