On Mon, Sep 05, 2005 at 12:35:36PM +0900, Dan Kogai wrote:
And I found that these can be made much, much simpler and more
intuitive with Perl 6, even more so than scheme!
our $ZERO = sub($f){ sub($x){ $x }};
our $SUCC = sub($n){ sub($f){ sub($x){ $f.($n.($f)($x)) }}};
our $ADD =
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
(Sorry for replying _so_ late...)
On Tue, 9 Aug 2005, Larry Wall wrote:
I kinda like Autrijus's idea that meta just means guts. In
classical Greek, meta just means with. The fancy philosophical
meaning of aboutness isn't there, but is a backformation from
terms such as metaphysics.
On Thu, Sep 01, 2005 at 12:07:59PM -0500, David Nicol wrote:
Does this mean that we have to implement perl4 compatability?
perl5 -e 'no 5; print [EMAIL PROTECTED]'
It's not valid perl 4:
$ perl4 -e 'no 5; print [EMAIL PROTECTED]'
syntax error in file /tmp/perl-em47tij at line 1, next 2
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
Juerd wrote:
However, in general, chained operators like comma, junction constructors
and infix zip, don't get an op= variant.
There's something nice in
$foo = 42;
$foo |= .bar for @quux;
as an alternative for
$foo = any 42, @quux.bar;
though
I had always assumed (e.g. in
Hi,
quick questions:
constant pi = 3; # works
# Is pi package- or lexically-scoped?
our constant pi = 3; # legal?
my constant pi = 3; # legal?
This is consistent with sub foo, our sub foo, and my sub foo,
which are all allowed.
--Ingo
--
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, Ingo Blechschmidt [EMAIL PROTECTED] wrote:
Hi,
quick questions:
constant pi = 3; # works
# Is pi package- or lexically-scoped?
our constant pi = 3; # legal?
my constant pi = 3; # legal?
Yep. Bare constant is package, just
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),
14 matches
Mail list logo