On Sun, 2004-05-09 at 06:46, Andi Gutmans wrote: > At 01:42 PM 5/9/2004 +0300, Stanislav Malyshev wrote: > >AG>>sure if this is the perfect solution: > >AG>>nullable MyClass $a = 5 > > > >I must be missing something, but why typehinted variable should have any > >default except for null anyway? If someone says "I want only MyClass > >here!", why he should be able to put 5 there?
I think I mentioned something pretty close to this (maybe I used forceable instead of nullable). However, it's not really obvious to me why you should be allowed to do the default assignment in this case. Can someone either give a quick example as to why I would want to assign a default value like this? Other than that, +1 on nullable in concept. John -- -=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=- John Coggeshall http://www.coggeshall.org/ The PHP Developer's Handbook http://www.php-handbook.com/ -=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=- -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php