Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84646 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4095 invoked from network); 12 Mar 2015 17:19:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Mar 2015 17:19:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=indeyets@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=indeyets@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.49 as permitted sender) X-PHP-List-Original-Sender: indeyets@gmail.com X-Host-Fingerprint: 74.125.82.49 mail-wg0-f49.google.com Received: from [74.125.82.49] ([74.125.82.49:36283] helo=mail-wg0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8F/92-24603-1AAC1055 for ; Thu, 12 Mar 2015 12:19:30 -0500 Received: by wghk14 with SMTP id k14so17920671wgh.3 for ; Thu, 12 Mar 2015 10:19:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=88wLuKcJe39Htms0HRQ8Im3OAhktVlSOa2lONCZupjk=; b=nRvi+7wSwTiasMWWwFTZx/EI20AE1em9S/AC0x2kJScrd+tJtti0TqKhXuGnm/D/UY /sj18gqz2UXIYPvMmLz7GQnFJ9DeITe7ZmzG+4dOYx3F3VnPoskdyRcJTc3I0gDRORcW ivBZUeIaNVcShFMikC+iS0i69oH0CWy7pVnHzEtEU29aBfhgkQASAT5gRJkoeJ5j2bdF ayP5aj/BtzIK6pSpeB8XNPEC4eIT0o7FYLMVvR5VfRu2Immj5DQwPWbZjKZ6odMNMc8Y 00eQIT1OLtNPfMLcb1RE8i9jqJAs2T/AqUKQ2X308Mk1KUR1mZ6fuoTZR+JWGWQ0AEAZ gfqA== X-Received: by 10.180.76.231 with SMTP id n7mr48650829wiw.93.1426180766010; Thu, 12 Mar 2015 10:19:26 -0700 (PDT) Received: from [10.0.1.8] ([91.219.26.208]) by mx.google.com with ESMTPSA id hj10sm10912325wjc.48.2015.03.12.10.19.24 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Mar 2015 10:19:24 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) In-Reply-To: <5501BE92.5020407@garfieldtech.com> Date: Thu, 12 Mar 2015 20:19:22 +0300 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: 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> <5501BE92.5020407@garfieldtech.com> To: Larry Garfield X-Mailer: Apple Mail (2.2070.6) Subject: Re: [PHP-DEV] static constructor From: indeyets@gmail.com (Alexey Zakhlestin) > On 12 Mar 2015, at 19:28, Larry Garfield = wrote: >=20 > I thought it sounded familiar. Also check the list archive for "A = modest proposal: __constructStatic" from a month ago. It was rejected = then, too. >=20 > Really, I cannot think of any cases where I want to have a static = class self-initialize with global data (because all statics are just = globals with a fancy dress) where I wouldn't slap myself for being = stupid and not just making a proper object, factory, DI, or any number = of other options are are 10x more testable and reusable and verifiable. = Sure there's places you could use it; there's just much better options = already available in the language and have been for a decade. I guess it=E2=80=99s just =E2=80=9Cdreaming=E2=80=9D about classes, = which are first-class citizens, like in smalltalk/ruby/python :-) But this is just an approximation, anyway. Real class-objects probably would never happen in PHP. --=20 Alexey Zakhlestin https://github.com/indeyets PGP key: http://indeyets.ru/alexey.zakhlestin.pgp.asc