Re: PDO subclass names

From: Date: Tue, 23 Apr 2024 13:17:37 +0000
Subject: Re: PDO subclass names
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-123182@lists.php.net to get a copy of this message
Sent from my iPhone > On 23 Apr 2024, at 22:35, Bilge <bilge@scriptfusion.com> wrote: > On 23/04/2024 10:25, Stephen Reay wrote: >> The argument that "Client" is meaningless becomes pretty moot when you realise >> that you can import a *namespace* and use it relatively, if you so wish: >> >> ``` >> import MyLib\HTTP; >> >> $a = new HTTP\Client(...); >> ``` > > Hi Stephen, > > Granted, but I also believe the user can and should have the reasonable expectation that they > can work comfortably (without conflicts or aliases) using leaf (class) names exclusively. > > Kind regards, > Bilge I'm sorry but I think you've missed the entire point of namespaces if you want class names to all be universally unique without their namespace component. The referenced RFC gives clear examples of how a class with a prefix would be converted to a namespace and class.

« previous php.internals (#123182) next »