Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55495 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79369 invoked from network); 18 Sep 2011 08:58:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Sep 2011 08:58:32 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:42887] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 20/80-04086-6B2B57E4 for ; Sun, 18 Sep 2011 04:58:31 -0400 Received: by yxi13 with SMTP id 13so4264609yxi.29 for ; Sun, 18 Sep 2011 01:58:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=PjyM4y+j0BXd83MoqG8rHqHRloqz/GwjBUABD/UScok=; b=MBf0VBpw9LiEp3HTmNPguhBipTL7/pobIwCh92ky5YUtfUTRajtr6MGUA94U1fKrXS G49fgTaFJwb8oS9dKIgwM+TNQFopdqNbAihpjEsL1HYjqUEytLYR7Gmi9spa2N/NaLAM OEb88J2XHwRkUOmvdKgeUc286zCbh70FT8H4Q= MIME-Version: 1.0 Received: by 10.236.168.3 with SMTP id j3mr6921317yhl.45.1316336307842; Sun, 18 Sep 2011 01:58:27 -0700 (PDT) Received: by 10.147.41.10 with HTTP; Sun, 18 Sep 2011 01:58:27 -0700 (PDT) In-Reply-To: References: Date: Sun, 18 Sep 2011 10:58:27 +0200 Message-ID: To: RQuadling@gmail.com Cc: Ferenc Kovacs , Nikita Popov , PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] __constructor parameter limitations. From: pierre.php@gmail.com (Pierre Joye) hi, My two cents: For one I do think that enforcing strictness, or as I see it, clean code and implementation, should be done in php. We did not do that in the past and it has created more issues than anything else in the long run. One solution to solve the need of having different methods or constructors signatures is to support multiple signature per method or constructor, as long as the signature of the parent class or interface is available. This is something becoming more and more common in other languages and is actually very handy. Having such things would have also avoided bad (per design while necessary) sutff like the recent reflection function to create objects without invoking the constructor. On Sat, Sep 17, 2011 at 11:39 PM, Richard Quadling wrote: > A subclass can completely divorce itself from the superclass. > > But not with an interface. > > > PHP has always been a very very flexible language. Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org