Hello & thanks Guy,
a very constructive mail! Of yours i like getval() and
var_default() and getdefault() a little bit.
so atm i am in favor of either getval() or ifsetor().
marcus
Saturday, July 10, 2004, 3:20:15 AM, you wrote:
> Andi Gutmans wrote:
>> Personally I am not that fond of ifs
Andi Gutmans wrote:
Personally I am not that fond of ifsetor(), but I am definitely not fond
of ?: because of Marcus' reasons.
Here is a list of other possible names to ponder, with examples:
// family: gettype, getenv, getopt, gets, getc
getval()
// $v = getval($_GET['v'],0);
Personally I am not that fond of ifsetor(), but I am definitely not fond of
?: because of Marcus' reasons.
At 12:26 AM 7/9/2004 +0200, Marcus Boerger wrote:
Hello Marc,
Thursday, July 8, 2004, 11:54:59 PM, you wrote:
> Marcus Boerger wrote:
>>
>> ?: would require a default value. ifsetor() allows
Marcus Boerger wrote:
it would allow two versions by having the default optional:
1) $a = ifsetor($b)
2) $a = ifsetor($b, NULL)
$a = $b ?: NULL;
How would the operator do the second? Will it look like the
following?
$a = $b ?:;
I defitively don't want that.
Me either. What I am saying is that
Hello Marc,
Thursday, July 8, 2004, 11:54:59 PM, you wrote:
> Marcus Boerger wrote:
>>
>> ?: would require a default value. ifsetor() allows to assume NULL hence
>> the latter is more powerfull. Hence id like to see a new keyword.
>>
> Well am not sure what you mean by more powerful, but the
Marcus Boerger wrote:
?: would require a default value. ifsetor() allows to assume NULL hence
the latter is more powerfull. Hence id like to see a new keyword.
Well am not sure what you mean by more powerful, but the character count
is about the same:
$a = ifsetor($b);
$a = $b ?: NULL;
And the se
Hello Marc,
Thursday, July 8, 2004, 4:07:54 PM, you wrote:
> Marcus Boerger wrote:
>> Hello Marc,
>>
>> it somply was far too lat3e in relase process. That's wy we ae all agreed
>> to delay that until 5.1. Also we were very unsure about the name of such
>> an operatorif you can collect all t
Hello Jay,
Thursday, July 8, 2004, 5:31:08 PM, you wrote:
> Marc Richards wrote:
>>
>> Well I'm partial to ?: and there seemed to be some support for it, but
>> there also seemed to be a non-trivial (though not necessarily difficult)
>> amount of work to get it to work right.
>>
>> ifsetor() is
Marc Richards wrote:
>
> Well I'm partial to ?: and there seemed to be some support for it, but
> there also seemed to be a non-trivial (though not necessarily difficult)
> amount of work to get it to work right.
>
> ifsetor() is obviously less concise, but also the name at first glance
> is a li
Marcus Boerger wrote:
Hello Marc,
it somply was far too lat3e in relase process. That's wy we ae all agreed
to delay that until 5.1. Also we were very unsure about the name of such
an operatorif you can collect all the ideas or can come up with ther
perfect one!?!
Well I'm partial to ?: and th
Hello Marc,
it somply was far too lat3e in relase process. That's wy we ae all agreed
to delay that until 5.1. Also we were very unsure about the name of such
an operatorif you can collect all the ideas or can come up with ther
perfect one!?!
a patch is here:
http://marcus-boerger.de/php/ext/
Hi Marc,
What we basically settled on was to use this syntax (as a new language
construct):
$x = ifsetor(mixed variable, mixed default);
If I recall correctly, Marcus had a patch that implemented it and it was
going to be plugged in in the 4.1 branch (when it is created).
I'm eagerly waiting fo
On 4/15/2004 Jason Garber asked about a new language construct to
simplify testing if a variable isset() and assinging a default value for
those that aren't. The thread title was "Construct Request".
I rember reading it while the discussion went on, I just went back and
browsed through it agai
13 matches
Mail list logo