Re: [RFC] Type hints

From: Date: Sun, 02 May 2004 17:17:32 +0000
Subject: Re: [RFC] Type hints
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-9635@lists.php.net to get a copy of this message
Hello Andi, Sunday, May 2, 2004, 6:09:22 PM, you wrote: > Hi Marcus, > I wouldn't use the syntax you proposed but you: > function func(MyClass $obj or null); an updated patch can be found here: http://somabo.de/php/ext/ze2/ze2-type-hints-20040502.diff.txt > Concerning type hints, I don't think that a type hint of "class" is useful. > If you don't use a base class as a type hint (which you will almost always > use) then how useful will this really be? Also, it's not really Class but > it's an Object, so we'd have to add another reserved word. In my opinion, > I'd only go with the "array" part of the typehints patch. the updated patch neither contain 'class' not 'object'. Adding Object as a reserved work is a bad ide imo because i thing many ppl use it for basic classes. The reasons i chose class in the first place were that i didn't want to add a new keyword and that i had the term 'instance of any class' in mind. > On another note, I think PHP 5 is already stable and quite mature. It's an > order of magnitude more stable than PHP 4 was when it was released. I think > we should start thinking of a deep feature freeze and a release date. As > we're in the beginning of May I think sometime towards July makes sense. > This does mean that we really need to stop adding stuff. I agree to open > the typehints issue because it could potentially lead to a BC break > depending what solution we take. more or less agreed. what i fear is missing the chance to act on bad test experience. but we can't wait forever, so how about a branch now, that could attract even more testers and hence give more feedback? best regards marcus

« previous php.internals (#9635) next »