Re: [Concept] Flip relative fu nction lookup order (global, then local)

From: Date: Fri, 23 Aug 2024 06:39:41 +0000
Subject: Re: [Concept] Flip relative fu nction lookup order (global, then local)
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-125106@lists.php.net to get a copy of this message
On 23 August 2024 00:15:19 BST, Mike Schinkel <mike@newclarity.net> wrote: >Having to prefix with a name like Foo, e.g. Foo\strlen() is FAR PREFERABLE to _\strlen() because >at least it provides satiating information rather than the empty calories of a cryptic shorthand. >#jmtcw, anyway. I knew I'd regret keeping the example short. Realistically, it's not a substitute for "\Foo\strlen", it's a substitute for "\AcmeComponents\SplineReticulator\Utilities\Text\strlen". Having a syntax for "relative to current" is incredibly common in other path-like syntaxes. The most common marker is ".", and ".\foo" is literally how you'd refer to something in the current directory under DOS/Windows. But unfortunately, we don't have "." available, so I wondered if "_" would feel similar enough. Another option would be to find a shorter keyword than "namespace" to put it in front. "ns\strlen(...)" is an obvious step from what we have currently, but it's not very obvious what it means, so maybe there's a different word we could use. Rowan Tommins [IMSoP]

« previous php.internals (#125106) next »