[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
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
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 leas
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 ?? :: i
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 itse
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 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:
> > > ?? !! 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
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
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 y
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
> > per
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 t
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 d
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) ?
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'
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 operat
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
http://convolution
HaloO,
I'm still contemplating how to get rid of the :: in the
ternary and make :: unequivocally available for a type
sigil and as a binary infix for symbol lookup.
Here's a possible solution:
1) ?? becomes a binary operator that behaves as follows:
a) it evaluates its lhs in boolean context
18 matches
Mail list logo