Re: Straw poll: Naming for `*any()` and `*all()` on iterables
| From: | tyson andre | Date: | Tue, 22 Dec 2020 15:05:25 +0000 |
| Subject: | Re: Straw poll: Naming for `*any()` and `*all()` on iterables | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-112591@lists.php.net to get a copy of this message | ||
Hi Marco,
>Hey Tyson,
>
> I know I'm being stubborn, but we have namespaces, but also an "old guard" that
> doesn't understand its own programming language 🤷♀️
I assume it's a case of not liking them or assuming others wouldn't like them instead of
not understanding them.
Namespaces for https://www.php-fig.org/psr/psr-4/
has been standard for a long, long time.
And attempts to standardize on adopting them have been unpopular - https://wiki.php.net/rfc/php_namespace_policy
Existing internal functionality for working with iterators and arrays is in the global namespace.
- E.g. it would be slightly more inconvenient to need to write
print(\PHP\get_debug_type($var)) or use function PHP\get_debug_type; ...;
get_debug_type($var);
and some developers wouldn't like seeing the extra imports or fully qualified names mixed
with code that doesn't use namespaces.
- It's inconsistent for some new categories of functionality to have namespaces when others
wouldn't - the php namespace policy vote seems to indicate there's no consensus on what
naming pattern we'd have for namespaces.
Even in brand new categories of functionality such as FFI or PhpToken, we've went with the
global namespace.
Regards,
- Tyson