Re: [RFC] Skipping parameters take 2

From: Date: Wed, 14 Jan 2015 19:50:29 +0000
Subject: Re: [RFC] Skipping parameters take 2
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message

> On 15/01/2015, at 06:33, Marcio Almada <[email protected]> wrote:
> 
> Marc Bennewitz, Stas,
> 
>> But I think adding "default" as new keyword is a big BC break!
>> I personally also don't like it and asked myself why can't the parameter
> simply skipped?
> 
> Default is already a reserved word AFAIK. But I've been thinking about
> alternatives to parameter skipping syntax which brought  me the Golang
> blank identifier _ to mind:
> 
>    create_query("deleted=0", "name", _, _, true);
> 
> Still not sure if it's better than default, though.

That would be a BC break as you can currently have a constant _. An existing keyword makes upgrading
easier, and default is easier to understand by someone who doesn’t know about the feature than an
underscore.
---
Simon Welsh
Admin of http://91carriage.com/ – Specialised SilverStripe
hosting



Thread (69 messages)

« previous php.internals (#80483) next »