Re: RFC: short and inner classes

From: Date: Fri, 14 Mar 2025 21:08:17 +0000
Subject: Re: RFC: short and inner classes
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On 14/03/2025 17:37, Rob Landers wrote:
What about a hybrid approach? Maybe something like \\ that Tim suggested?
I'm surprised nobody has pointed out yet that \ as namespace separator is already controversial because of how commonly it is used as an escape prefix, leading to a lot of situations where it has to be doubled. A double backslash would be, literally, twice as bad, needing \\\\ (four backslashes) to reference the name in a string, a JSON or YAML config file, a Markdown tutorial, etc As a perfect example of this, check out how the second paragraph is rendered wrong here: https://externals.io/message/126589#126741 (compare here: https://news-web.php.net/php.internals/126741) The other thing I wonder is whether the original reason why :: wasn't used as the namespace separator still applies, and needs to be accounted for here? -- Rowan Tommins [IMSoP]

Thread (102 messages)