[EMAIL PROTECTED] (Larry Wall) writes:
So let's go ahead and make it ??!!. (At least this week...)
I hereby christen this the interrobang operator.
(http://en.wikipedia.org/wiki/Interrobang)
--
Your fault: core dumped
-- MegaHAL
On Tue, Sep 06, 2005 at 04:57:30PM +0200, Thomas Sandlass wrote:
: HaloO,
:
: Luke wrote:
: Okay, now why don't you tell us about this new binary :: you're proposing.
:
: Well, not a new one. Just plain old foo::bar::blahh and 'my ::blubb $x'
: with relaxed whitespace rules. The ternary ?? ::
On Wed, Sep 07, 2005 at 08:32:39AM -0700, Larry Wall wrote:
I think that's a powerful argument even if we don't have an infix:::.
Plus I hate all infix nor operators due to my English-speaking bias
that requires a neither on the front. So let's go ahead and make
it ??!!. (At least this
Larry Wall skribis 2005-09-07 8:32 (-0700):
I think that's a powerful argument even if we don't have an infix:::.
Plus I hate all infix nor operators due to my English-speaking bias
that requires a neither on the front. So let's go ahead and make
it ??!!. (At least this week...)
I was
Luke wrote:
Not that being explicit is always a bad thing:
$val = some_cond()
?? ($arg1 // $arg1_default)
// ($arg2 // $arg2_default)
No. What's a bad thing is creating new linguistic traps for when people
inevitably forget to be explicit.
And I question
On Tue, Sep 06, 2005 at 07:26:37AM +1000, Damian Conway wrote:
Thomas Sandlass wrote:
I'm still contemplating how to get rid of the :: in the
ternary
Comments?
I believe that the single most important feature of the ternary operator is
that it is ternary. That is, unlike an if-else
HaloO,
Luke wrote:
?? !! ain't bad either.
It's definitely much better that sabotaging the
(highly useful) // operator
within (highly useful) ternaries.
I guess the thing that I really think is nice is getting :: out of
that role and into the type-only domain.
Right. To make ::
On 9/6/05, Thomas Sandlass [EMAIL PROTECTED] wrote:
Right. To make :: indicate type or meta was my primary concern.
Okay, now why don't you tell us about this new binary :: you're proposing.
Luke
HaloO,
Luke wrote:
Okay, now why don't you tell us about this new binary :: you're proposing.
Well, not a new one. Just plain old foo::bar::blahh and 'my ::blubb $x'
with relaxed whitespace rules. The ternary ?? :: is a splinter in my
mind's eye because it is not a compile time or symbol lookup
On Tue, Sep 06, 2005 at 04:57:30PM +0200, Thomas Sandlass wrote:
There's yet another approach, to make ternary listfix:
$val = $cond ?? true ?? false;
So
^^ that one
doesn't do the same thing as
^^ that one?
I'd find that confusing in itself.
Thomas Sandlass skribis 2005-09-05 14:38 (+0200):
b) if this is true, ?? evaluates its rhs such that it
can't be undef
But
$foo ?? undef // 1
then is a problem.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
Thomas Sandlass wrote:
I'm still contemplating how to get rid of the :: in the
ternary
Comments?
I believe that the single most important feature of the ternary operator is
that it is ternary. That is, unlike an if-else sequence, it's impossible to
leave out the else in a ternary
Patrick suggested:
At OSCON I was also thinking that it'd be really nice to get rid of
the :: in the ternary and it occurred to me that perhaps we could use
something like '?:' as the 'else' token instead:
(cond) ?? (if_true) ?: (if_false)
However, I'll freely admit that I hadn't
On 9/5/05, Damian Conway [EMAIL PROTECTED] wrote:
Patrick suggested:
At OSCON I was also thinking that it'd be really nice to get rid of
the :: in the ternary and it occurred to me that perhaps we could use
something like '?:' as the 'else' token instead:
(cond) ?? (if_true)
On 9/5/05, Juerd [EMAIL PROTECTED] wrote:
Thomas Sandlass skribis 2005-09-05 14:38 (+0200):
b) if this is true, ?? evaluates its rhs such that it
can't be undef
But
$foo ?? undef // 1
then is a problem.
Yeah. Hmm, but I kinda like the look of ?? //, and I don't like
Luke wrote:
Yeah. Hmm, but I kinda like the look of ?? //, and I don't like the
overloading of :: in that way anymore. So it's possible just to add
a ternary ?? // in addition to, and unrelated to (from the parser's
perspective), the regular //.
Bad idea. This useful construct would then
On 9/6/05, Damian Conway [EMAIL PROTECTED] wrote:
Luke wrote:
Yeah. Hmm, but I kinda like the look of ?? //, and I don't like the
overloading of :: in that way anymore. So it's possible just to add
a ternary ?? // in addition to, and unrelated to (from the parser's
perspective),
17 matches
Mail list logo