Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84698 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68825 invoked from network); 13 Mar 2015 17:28:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Mar 2015 17:28:54 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.179 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.179 mail-we0-f179.google.com Received: from [74.125.82.179] ([74.125.82.179:41937] helo=mail-we0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 82/8C-32208-45E13055 for ; Fri, 13 Mar 2015 12:28:53 -0500 Received: by wesw62 with SMTP id w62so24791379wes.8 for ; Fri, 13 Mar 2015 10:28:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=IK+uKAysKVMb6rTiUDK9Dg1dwQLnBe+d69hNk+jdkFY=; b=UkTHOf5AR8Hzyk2wXZESEbf6MtrIfalaeLWtu3HsAeEf3HNP7GKgpm3ME4PYSXUnEe Iy9d2kZloTKVXbicTqCGPLje3SAdfqAFKjch8XHbgWfN8DMkyW4aXojPz9XpZHkjtzEe Y75xvwm+nkR9p01SSZG/sMzt75BlUsBJm89lK/3Ji6ErTo6njtU+Fwg707V6IcvD2940 v2fhQii8s3dGtPjyCzRYloDsd10YlCwURNgsNUNvebR5StYQtHpITfU7zw5wXDZ/uogN g+KTzAw3o4Od0B77Wmw3uZF3OFKqbBt1/I3vmsJVzGXolx9vz0suQPJHsbx+93QJp6te lfYA== X-Received: by 10.194.143.20 with SMTP id sa20mr46143662wjb.75.1426267729264; Fri, 13 Mar 2015 10:28:49 -0700 (PDT) Received: from [192.168.0.159] ([62.189.198.114]) by mx.google.com with ESMTPSA id fo8sm3662620wib.14.2015.03.13.10.28.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Mar 2015 10:28:48 -0700 (PDT) Message-ID: <55031E26.7040905@gmail.com> Date: Fri, 13 Mar 2015 17:28:06 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: internals@lists.php.net References: <6D.2C.32765.10EC0055@pb1.pair.com> <5500D967.5040800@gmail.com> <13.69.64353.73451055@pb1.pair.com> <5501876C.3020107@gmail.com> <3D.85.42021.3E7A1055@pb1.pair.com> <5501B77D.5010800@gmail.com> <85.D1.24603.247C1055@pb1.pair.com> <5501D328.9040800@gmail.com> <98.26.24603.C9DE1055@pb1.pair.com> <5501F823.3060805@gmail.com> <55023052.40100@gmx.de> <7B.3E.24603.E83B2055@pb1.pair.com> <5502CFB4.7080406@gmail.com> <5502E7D6.50909@gmail.com> <2D.57.32208.DD303055@pb1.pair.com> In-Reply-To: <2D.57.32208.DD303055@pb1.pair.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] static constructor From: rowan.collins@gmail.com (Rowan Collins) Johannes Ott wrote on 13/03/2015 15:35: > I think as Christoph wrote we should now do a cut here for the inital > discussion, because we are in a circle now. I will now get on at the RFC > process, and will prepare the RFC-draft asap. > > I will try to summarize as good as possible all discussion points we had > the last days here. And I will try to figure out as clearly as possible > how each point really touchs the purpose of the new requested language > feature or is a general problem if you use static context a "wrong" way, > although outside the static constructor. > > I want to say thank you especially to you Rowan, for the so far very > good discussion, which gives a lot of input to me for writting the RFC. Yes, you are probably right. Thank you for putting up with my relative ignorance of the concepts, and I'm glad you found the discussion constructive. I do now see that there are some where this would be useful, particularly in lieu of enum or metaclass logic for pre-processing the pure data in a class definition. Where I vary is in the validity of some of the use cases presented, which feel like they're making static methods do things that belong in an object, but that's largely a matter of opinion and coding style rather than functionality. I think the most similar thing we have at the moment is destructors - you can't know exactly when they will be called, only that they will be, so have to be very careful not to put too much logic into them which can have odd side effects, generate errors at unexpected moments, etc. Regards, -- Rowan Collins [IMSoP]