On 05/01/2015 22:35, Andrea Faulds wrote:
If the default values are obvious and intuitive, as they should be, you don’t
need “default”.
It's not always a case of not knowing what the default values are;
sometimes it's a case of not knowing - and not wanting to worry about -
what they might b
> I’m not saying change existing APIs. I’m saying add new, parallel ones.
We’ve done this before, we can do it again. It doesn’t break BC.
Makes sense to have new better overlapping APIs while old ones are slowly
deprecated (which is still a (delayed) BC break). Thanks for clarifying
this, anyway.
Hi Marcio,
> On 5 Jan 2015, at 23:14, Marcio Almada wrote:
>
> Not sure how this RFC rant is helpful since it's based on completely unreal
> alternatives. This "We should get better APIs instead" suggestion, in
> practice, means a ton of BC breaks that will never happen on PHP global
> functions
Hi,
Stanislav, great RFC. A huge part of core PHP API would benefit of
parameter skipping.
Andrea Faulds,
> It’s not that I don’t need this… there are some horrible APIs I’ve used
which would be slightly (but only slightly) more pleasant to use with this
feature. But I don’t think we should add
Hi!
> Sure, but things like this make such APIs easier to work with. That’s
> not a good thing.
For me, it is. Your stance is "if it's not ideal (in my opinion) design,
we should not do anything to make it better". I think it's wrong - there
are many opinions about what ideal design is, and yours
Hi Stas,
> On 5 Jan 2015, at 22:24, Stanislav Malyshev wrote:
>
> Hi!
>
>> Yes, they complement one another. Both exist because of horrible
>> APIs. But I don’t think we should encourage horrible APIs.
>
> You can create horrible APIs with this, but you can also create them
> without this. Thi
Hi!
> Yes, they complement one another. Both exist because of horrible
> APIs. But I don’t think we should encourage horrible APIs.
You can create horrible APIs with this, but you can also create them
without this. This doesn't make it any more likely, it just makes
working with optional paramete
Hi Stas,
> On 5 Jan 2015, at 22:02, Stanislav Malyshev wrote:
>
> For those who doesn't remember, quick reminder - it is about an ability
> to skip parameters in function calls so they'd take default value, like
> this:
> function foo($a, $b = true, $c = "abc") { ... }
> foo($x, default, $y); //
Hi!
As I've got some questions on the topic, I'd like to revive and soon put
to vote the parameter skipping RFC: https://wiki.php.net/rfc/skipparams
For those who doesn't remember, quick reminder - it is about an ability
to skip parameters in function calls so they'd take default value, like
this