AW: AW: [PHP-DEV] [RFC] Skipping parameters take 2

From: Date: Sat, 17 Jan 2015 11:04:53 +0000
Subject: AW: AW: [PHP-DEV] [RFC] Skipping parameters take 2
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-80689@lists.php.net to get a copy of this message
> -----Ursprüngliche Nachricht----- > Von: Stanislav Malyshev [mailto:smalyshev@gmail.com] > Gesendet: Freitag, 16. Januar 2015 21:35 > An: Robert Stoll; 'Marc Bennewitz'; internals@lists.php.net > Betreff: Re: AW: [PHP-DEV] [RFC] Skipping parameters take 2 > > Hi! > > > This would be quite a nice feature, even if this RFC does not pass. > > Just as hint, there are ambiguous case which need to be considered: > > > > interface A{ function foo($a=1); } interface B{ function foo($a="hi"); > > } class C implements A, B{ function foo($a=default){} //what would be > > the default value? } > > I'm not sure specifying the default on the interface makes much sense, since you'd > have to override it anyway. I am > inclined to only support it for extending (parent class). But if there's an easy way to do > it for interfaces, it's ok - but checking > that there are no duplicates may be expensive. > > -- > Stas Malyshev > smalyshev@gmail.com > > -- > PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: > http://www.php.net/unsub.php I think you are right and restricting it to the parent class only would remove the ambiguity

« previous php.internals (#80689) next »