Re: Revisiting the "Named Arguments" RFC

From: Date: Sun, 12 Jan 2014 17:27:40 +0000
Subject: Re: Revisiting the "Named Arguments" RFC
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Am 12.01.2014 18:07, schrieb Kevin Ingwersen:
> Am So. Jan. 12 2014 18:02:39 schrieb Andrea Faulds:
>> On 12/01/14 09:14, Kevin Ingwersen wrote:
>>> So therefore, I would actually suggest using colons. It does quite mimic the ObjC
>>> calling style, but it keeps the old-fashioned function style, which I honestly prefer (besides,
>>> adopting an ObjC messaging style syntax would be either ultra-hard or never accepted :D).
>> It also looks like C#'s named arguments.
> Oh really? Good to know, I never did anything more than Hello World with C#, because I dont
> trust in Mono a lot on OS X ^^;

Personally as a layman I'd prefer that syntax, too. And for keywords:
You could simply put them in quotes, making is similar to the
object-syntax in JavaScript/ECMAScript. And even variable-handling would
be out of the discussion I guess:

$abc = 'class';
test(foo: "oof", bar: "rab", 'function': 'moo', $abc:
'Foobar');

Regards,
  Christian Stadler



Thread (29 messages)

« previous php.internals (#71093) next »