Re: [RFC][DISCUSSION] Deprecation of fallback to root scope

From: Date: Tue, 06 Feb 2018 19:14:46 +0000
Subject: Re: [RFC][DISCUSSION] Deprecation of fallback to root scope
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-101786@lists.php.net to get a copy of this message
Hi! > Yes we do have root namespace lookup, but its not automatic, it is only > as a fallback. This RFC is about removing the intermediate namespace'd > check, hence requiring \strlen. It is automatic, in the meaning you don't have to do anything to get it. Realistically, how often do you override strlen? If I say "never", I probably would be close enough for all practical purposes. > My idea was to force all function lookups into the global nameespace > first by doing the declare or use. This way someone writing a file could > state "i dont use namespaced functions in this file, don't try to load > them". Why? We already have this working, why make it harder by requiring to do specific things that we know upfront 99%+ people end up doing? Why not assume them by default? -- Stas Malyshev smalyshev@gmail.com

« previous php.internals (#101786) next »