On Tue, Feb 24, 2015 at 9:58 AM, Florian Anderiasch <m...@anderiasch.de> wrote:
> On 02/24/2015 03:29 PM, Dennis Birkholz wrote:
>> Am 24.02.2015 um 14:52 schrieb Philip Sturgeon:
>>> https://wiki.php.net/rfc/anonymous_classes
>>
>> I like the idea of having anonymous classes, it is very helpful during
>> development to just try something out without having the burden of
>> creating a new file and a complete class including namespace and use
>> declarations, etc.
>
> I don't buy this argument. If your class loader or PSR prevents you from
> temporarily adding a 2nd bogus class to the same file (not talking about
> best practices here, obviously) then there's the culprit and it's
> nothing the language needs to fix.
>
> ~Florian
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>

Your reply seems to assume that avoiding rules in a PSR is the only
benefit of the RFC, which is weird when there is a whole RFC full of
benefits of this RFC.

Also, how do you "Temporarily" add a 2nd bogus class to the same file?

Also again, why is it bogus?

This RFC allows people to use really simple classes, which implement
various things, or provide simple decoration, or insanely easy
stubbing, or all sorts of other functionality without having to define
it way at the top of the file, or in another file, or whatever. Not
just bogus junk, but actual real uses.

My mention of PSR (and PEAR and Zend which you didn't mention) was
purely a sidenote of "This is how the community is doing things" which
is always relevant to mention, and not a complaint about PSRs. This
was common practice for the preceding decade, and again is not the
crux of this conversation.

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to