Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42335 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19820 invoked from network); 18 Dec 2008 19:26:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Dec 2008 19:26:17 -0000 Authentication-Results: pb1.pair.com header.from=piccoloprincipeazzurro@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=piccoloprincipeazzurro@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.21 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: piccoloprincipeazzurro@gmail.com X-Host-Fingerprint: 209.85.218.21 mail-bw0-f21.google.com Received: from [209.85.218.21] ([209.85.218.21:35119] helo=mail-bw0-f21.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 81/E5-09584-7D3AA494 for ; Thu, 18 Dec 2008 14:26:16 -0500 Received: by bwz14 with SMTP id 14so1845496bwz.23 for ; Thu, 18 Dec 2008 11:26:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=NNp2pRN9/IeSVplzz8YLoNdGbGKAdFV1wsK07BDZOV4=; b=ELy82sPk3Ry442caVb3/Ve3jGhu/D/Z4TE8JYOO8gUarb5Cj4DEOJIj79iTelWELJg b6aTuIRr+ivAG3LkB0EV1wbbTVhx3RBlq+1L0YjaEyLuFIgnkPg28kH0Mvppc5U0t4fk NHVJ2oyInYoWMsAoFeHZ3ZFz6lN/uUcBNIAzQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=JqDLcRK/dnYcrrgc8yA1Q9WfdDjZQFupBSLfs7+NWdBYBn5qHKEy7of/Z4Seaft4kg Qqs1vwQmp6TTDvsi4u5Lm0Twvx6d8bqZp/0wMIfittC+1mQTyzn/U0NgRVdwX3GT5lOD XkJ/tShAVlU/LtKKeb/7CIbMPMmKPNhRbHefI= Received: by 10.103.24.11 with SMTP id b11mr903877muj.58.1229628372629; Thu, 18 Dec 2008 11:26:12 -0800 (PST) Received: by 10.102.218.1 with HTTP; Thu, 18 Dec 2008 11:26:12 -0800 (PST) Message-ID: <8637af910812181126y3c0f0badv64f591c22480834e@mail.gmail.com> Date: Thu, 18 Dec 2008 20:26:12 +0100 To: "Dave Ingram" Cc: "Nathan Rixham" , internals@lists.php.net In-Reply-To: <494A3B12.80509@dmi.me.uk> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_34292_4423135.1229628372569" References: <69.22.48223.7E389494@pb1.pair.com> <494A3B12.80509@dmi.me.uk> Subject: Re: [PHP-DEV] Q on Primitives From: piccoloprincipeazzurro@gmail.com ("Giorgio Sironi") ------=_Part_34292_4423135.1229628372569 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 2008/12/18 Dave Ingram > Nathan Rixham wrote: > > [...] > > > > while I'm here I may as well also ask about further adding type > > hinting for the existing scalars and array. > +1, but I don't know what might have stopped it being implemented before > (time, parsing API changes, etc), so it would be interesting to look > into the history. > This is simple to achieve with assert('is_string($argument)'); class MyTestClass { > public function blah(Foo $f); > public function blah(Bar $b); > public function blah($v); > } > > I would argue that the most specific function should be called, but how > costly would that be to determine? What if you have a "Baz" subclass of > Bar, but no corresponding method? What if Bar itself is a subclass of Foo? > I remember that multiple signatures was said to have a possible very difficult implementation. However, a similar behaviour can be achieved by some instanceof(). -- Giorgio Sironi Piccolo Principe & Ossigeno Scripter http://www.sourceforge.net/projects/ossigeno ------=_Part_34292_4423135.1229628372569--