Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83671 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1127 invoked from network); 24 Feb 2015 15:31:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Feb 2015 15:31:45 -0000 Authentication-Results: pb1.pair.com header.from=pjsturgeon@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pjsturgeon@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.177 as permitted sender) X-PHP-List-Original-Sender: pjsturgeon@gmail.com X-Host-Fingerprint: 209.85.217.177 mail-lb0-f177.google.com Received: from [209.85.217.177] ([209.85.217.177:34148] helo=mail-lb0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AF/E3-10521-F599CE45 for ; Tue, 24 Feb 2015 10:31:44 -0500 Received: by lbdu14 with SMTP id u14so25554383lbd.1 for ; Tue, 24 Feb 2015 07:31:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ngPwMaIg6bWtcZEE4X3GyWGKNziaPUELLRAD0AfWWL4=; b=G4rblx7EysYM6K2Im4CqDWoXrND39JvskV2dH2sG9Ng8JCH+93MsWnA3FDu4zdPSOE 8orVvPX78hEcGpEDos3V/MuAbr3x2TV5FtDUlwUtm/q+WEuq/h0dIhU0Jrqm3O8GtiGk 2zmYqXgRAcwESZNo2e7UAqkAmbFKtmIbacRX2VlGQJpa89bx+z03ULVVHQ3hDdvXNhhW uJ0okMCD0FPYFaV0xWa9TN4x5Zn50Lk8M8q0ulIv0ZQyNaeqKl0NxH0tc4JDbd2X0CW4 WoYk7EudsnKgncjnNzHRs9GKTyj4MbMwtupWDgSlK9M/G708KdWXkHmkOtc/XK3sdk0+ rP2Q== MIME-Version: 1.0 X-Received: by 10.112.39.69 with SMTP id n5mr14860513lbk.1.1424791901060; Tue, 24 Feb 2015 07:31:41 -0800 (PST) Received: by 10.114.26.34 with HTTP; Tue, 24 Feb 2015 07:31:41 -0800 (PST) In-Reply-To: <54EC917B.4000309@anderiasch.de> References: <54EC8ABD.7040802@birkholz.biz> <54EC917B.4000309@anderiasch.de> Date: Tue, 24 Feb 2015 10:31:41 -0500 Message-ID: To: Florian Anderiasch Cc: Dennis Birkholz , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Anonymous Classes From: pjsturgeon@gmail.com (Philip Sturgeon) On Tue, Feb 24, 2015 at 9:58 AM, Florian Anderiasch 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.