Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10599 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15206 invoked by uid 1010); 18 Jun 2004 18:42:45 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 15181 invoked from network); 18 Jun 2004 18:42:45 -0000 Received: from unknown (HELO mx.thebrainroom.net) (65.200.24.98) by pb1.pair.com with SMTP; 18 Jun 2004 18:42:45 -0000 Received: by mx.thebrainroom.net (Postfix, from userid 517) id 84B5F14880C4; Fri, 18 Jun 2004 11:42:15 -0700 (PDT) Received: from BAUMBART (pD95F8E8B.dip.t-dialin.net [217.95.142.139]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mx.thebrainroom.net (Postfix) with ESMTP id 4E7EB148809B; Fri, 18 Jun 2004 11:42:13 -0700 (PDT) Date: Fri, 18 Jun 2004 20:40:47 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <8710223113.20040618204047@marcus-boerger.de> To: Hans Lellelid Cc: internals@lists.php.net In-Reply-To: <40D2FF04.3010003@velum.net> References: <20040615112747.27402.qmail@pb1.pair.com> <40CEDECA.9040600@cschneid.com> <40D05892.6090804@memefeeder.com> <913185304.20040616211716@marcus-boerger.de> <40D19B3E.4030802@memefeeder.com> <4210590559.20040617205826@marcus-boerger.de> <40D2FF04.3010003@velum.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on jc.thebrainroom.net X-Spam-Status: No, hits=0.8 required=5.0 tests=PRIORITY_NO_NAME autolearn=no version=2.63 X-Spam-Level: X-TBR-Filter: Virus scanned and defanged Subject: Re: [PHP-DEV] Re: ClassHints and NULL From: helly@php.net (Marcus Boerger) Hello Hans, Friday, June 18, 2004, 4:41:08 PM, you wrote: > Hi, > Marcus Boerger wrote: >> Last but not least we know already that a lot of people like to >> be able to handle both instanceof or null with typehints. But at >> the moment we have no solution that can go into PHP 5.0. However >> i am quite sure we will address this for 5.1. > I'm glad this issue will be re-evaluated. I think the loss of null > option is disappointing since it precludes optional params (which was > really the only place I was using it), but I also understand the reasoning. gooood :-) > Here is a slightly related example from my code [....] -- and it > would be nice if I could use optional paramters w/ typehints. IMO thats the only valid point you brought up here. Another thing missing is that in derived classes the typehints should be able to accept superclasses like the following patch does: http://marcus-boerger.de/php/ext/ze2/ze2-type-hint-classes-20040327.diff.txt [This patch may be a little bit outdated though :-) ] > Of course, namespaces are more important than anything ;) hehe, could you live with packages? regards marcus