Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13613 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29826 invoked by uid 1010); 29 Oct 2004 23:26:38 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 29719 invoked from network); 29 Oct 2004 23:26:37 -0000 Received: from unknown (HELO took.shire) (68.125.98.48) by pb1.pair.com with SMTP; 29 Oct 2004 23:26:37 -0000 Received: (qmail 44744 invoked by uid 1001); 29 Oct 2004 23:29:01 -0000 Date: Fri, 29 Oct 2004 23:29:01 +0000 To: internals@lists.php.net Message-ID: <20041029232901.GF31167@bagend.shire> Mail-Followup-To: internals@lists.php.net References: <20041022174124.27478.qmail@pb1.pair.com> <20041027002106.94528.qmail@pb1.pair.com> <15784920.20041027092711@marcus-boerger.de> <417F620D.3030106@cschneid.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <417F620D.3030106@cschneid.com> User-Agent: Mutt/1.4.1i Subject: Re: [PHP-DEV] Type hints with null default values From: curt@php.net (Curt Zirzow) * Thus wrote Christian Schneider: > Please don't add another parameter syntax (especially with line-noi... > err special characters) like [BaseClass]. This would make PHP more > unreadable than it needs to be for a minor feature. To allow > foo(BaseClass $objA = null) to also accept foo(null); handles the few > cases where you want to pass null nicely IMHO. I'd have to agree, that changing the syntax on how to pass optional class type hints, is probably not a good thing to do. It has been traditional to set a parameter to default by assigning a value to the paramater, and the rule always has been what kind of value can be assigned. Curt -- Quoth the Raven, "Nevermore."