Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13352 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46682 invoked by uid 1010); 16 Oct 2004 22:00:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 46632 invoked by uid 1007); 16 Oct 2004 22:00:53 -0000 Message-ID: <20041016220053.46630.qmail@pb1.pair.com> To: internals@lists.php.net Date: Sat, 16 Oct 2004 19:00:52 -0300 References: <20041016191353.85746.qmail@pb1.pair.com> Lines: 22 User-Agent: KNode/0.8.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Posted-By: 200.196.109.2 Subject: RE: [PHP-DEV] Type hints with null default values From: cunha17@uol.com.br (Cristiano Duarte) Robert Silva wrote: > I think Marcus B's final comments in the original discussion are right on > track. > > Stab: I voted for NULL type hinted arguments before I voted against them. > > The main thing that changed my mind, is that in PHP there is no such thing > as a NULL object. I came to the conclusion that PHP wasn't broken, my > programming style/code was. > > My opinion is that they should stay as they are now although personally. > > Now with that said, I do think there needs to be a method to allow a type > hinted parameter to be optional (but not necessarily null). That's what I'm asking for. :-) I'm not asking for null objects, just an optional parameter that must be an object or a "null" reference. All OO languages I've ever programmed had this kind of reference(Java, C++, Delphi, etc.) Cristiano Duarte