Luke Palmer wrote:
> The difference between POST and NEXT is simply that POST fails to
> refrain from executing after the final iteration, while NEXT does not.
Or in other words:
The difference between POST and NEXT is that POST executes after the final
iteration, while NEXT does not.
NEXT happ
Can the type of a variable vary independenty of its value?
Consider the following:
my @a = (1,2,3);
my $b := @a;
@a and $b both refer to the same object. $b's object has methods such as
PUSH, POP, etc, as does @a's.
So the type of the value (object) is the same in each case, but the
vari
I have an idea !
Damian conway's Attribute::Types suggests
"my $date: INTEGER(1..31);"
but i think
"my int( 1..31 ) $date"
is more like a c++/java
"Integer date( 1, 31 );"
and a weddig of both should fit perl6 best. Would mean:
my int( 1..31 ) $var;
$date = 23; # okay
$date
Dave Whipp wrote:
>print @a + $b
>
> This will evaluate each, in numeric context. To get at those numbers,
> Perl will translate this to something like
>
>print @a.FETCHSIZE + $b.FETCHNUM
I thought[*0] that Larry said arrays in a scalar context are now treated
as array references, so ac
Murat Ünalan wrote:
> print "date" if $var is int( 1..31 );
I don't think that the type needs to be specified here, especially if
the variable has already been declared to be of the required type, so a
junction should be sufficient:
print "date" if $var == any(1 .. 31);
Smylers
On Friday, January 3, 2003, at 08:55 AM, Smylers wrote:
Murat Ünalan wrote:
print "date" if $var is int( 1..31 );
I don't think that the type needs to be specified here, especially if
the variable has already been declared to be of the required type, so a
junction should be sufficient:
pri
On Friday, January 3, 2003, at 12:00 PM, Chris Dutton wrote:
print "date" if 1..31 given $var;
Except that this would always be true. Nevermind, I'm an idiot.
One of the wise may override my evaluation, but...
On Thu, 2 Jan 2003, Dave Whipp wrote:
> Can the type of a variable vary independenty of its value?
My understanding is that the type of a variable merely restricts the type
of value you can assign to it. (Well, it probably does more, but I'm no
--- Smylers <[EMAIL PROTECTED]> wrote:
> Murat Ünalan wrote:
>
> > print "date" if $var is int( 1..31 );
>
> I don't think that the type needs to be specified here, especially if
> the variable has already been declared to be of the required type, so a
> junction should be sufficient:
>
> prin
On Fri, Jan 03, 2003 at 10:58:49AM -0800, Mr. Nobody wrote:
> --- Smylers <[EMAIL PROTECTED]> wrote:
> > junction should be sufficient:
> >
> > print "date" if $var == any(1 .. 31);
>
> Superpositions in the core? You're kidding, right?
>
> What's wrong with "if 1 <= $var <= 31"?
My understan
> Date: Fri, 3 Jan 2003 12:06:24 -0500
> From: Chris Dutton <[EMAIL PROTECTED]>
>
> On Friday, January 3, 2003, at 12:00 PM, Chris Dutton wrote:
>
> > print "date" if 1..31 given $var;
>
> Except that this would always be true. Nevermind, I'm an idiot.
You're not such an idiot. You just got o
Chris Dutton wrote:
> On Friday, January 3, 2003, at 08:55 AM, Smylers wrote:
>
> > Murat Ünalan wrote:
> >
> > > print "date" if $var is int( 1..31 );
> >
> > print "date" if $var == any(1 .. 31);
>
> I was under the impression the "smart match" operator would cover that
> implicitly.
Ah, y
David Storrs wrote:
> On Fri, Jan 03, 2003 at 10:58:49AM -0800, Mr. Nobody wrote:
>
> > --- Smylers <[EMAIL PROTECTED]> wrote:
> >
> > > junction should be sufficient:
> > >
> > > print "date" if $var == any(1 .. 31);
> >
> > Superpositions in the core? You're kidding, right?
Yeah, somehow t
In the name of the bum (and c++-used eyes), i have some small criticism
about the "type and property" syntax. "Exegesis 2 - Any variables to
declare?" suggests:
my int ($pre, $in, $post) is constant = (0..2);
Two things "type and property" that belong so together are visually so
disrupted, which
--- Smylers <[EMAIL PROTECTED]> wrote:
> David Storrs wrote:
>
> > On Fri, Jan 03, 2003 at 10:58:49AM -0800, Mr. Nobody wrote:
> >
> > > --- Smylers <[EMAIL PROTECTED]> wrote:
> > >
> > > > junction should be sufficient:
> > > >
> > > > print "date" if $var == any(1 .. 31);
> > >
> > > Superp
[EMAIL PROTECTED] (Mr. Nobody) writes:
> I looked through the p6l archives, there really wasn't much discussion about
> it.
http://groups.google.com/groups?q=superpositions+group%3Aperl.perl6.language
finds 141 articles.
--
An ASCII character walks into a bar and orders a double. "Having a bad
Various folks wrote:
Superpositions in the core? You're kidding, right?
Nope. They're in (this week at least!)
What's wrong with "if 1 <= $var <= 31"?
...nothing. If you like it, by all means use it. But, (1) TIMTOWTDI,
(2) Smyler's version is more visually concise (although, granted, it
Simon Cozens wrote:
http://groups.google.com/groups?q=superpositions+group%3Aperl.perl6.language
finds 141 articles.
Thanks, Simon.
BTW, searching for "junctions" as well (i.e. the new name for the concept)
adds an extra 70 or so articles.
Damian
[EMAIL PROTECTED] (Damian Conway) writes:
> > http://groups.google.com/groups?q=superpositions+group%3Aperl.perl6.language
> > finds 141 articles.
>
> BTW, searching for "junctions" as well (i.e. the new name for the concept)
> adds an extra 70 or so articles.
Some of which are superimposed! :)
Murat Ünalan wrote:
my int ($pre, $in, $post) is constant = (0..2);
Two things "type and property" that belong so together
Do they? Surely the type and constancy of a variable are entirely
orthogonal to each other.
Besides, if you want them near each other, you can write them this way:
my
Piers Cawley wrote:
Acknowledgements
But, of course, modesty forebade him from thanking the tireless Perl 6
summarizer himself, for his sterling efforts wading through the morasses
that are P6-language and P6-internals, endlessly straining out the essentials
for the benefit of those in the Perl
Do list objects automatically turn lazy if they are assigned another
lazy list. Could I make a lazy list of the natural numbers like
this:?
@natural = 0..Inf;
Or would that end up consuming aleph-null time (neglecting issues of
finite representation)?
More interestingly, could C be used laz
- Original Message -
From: "Mr. Nobody" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 03, 2003 1:58 PM
Subject: Re: "my int( 1..31 ) $var" ?
> --- Smylers <[EMAIL PROTECTED]> wrote:
> > Murat Ünalan wrote:
> >
> > > print "date" if $var is int( 1..31 );
> >
> "JG" == Joe Gottman <[EMAIL PROTECTED]> writes:
JG> Speaking of which, is there a run-time test to check if a variable is of
JG> integral type? Something like
JG> print "date" if ($var is int) && (1 <= $var <= 31);
the old standby is:
int( $var ) == $var
uri
--
Uri G
- Original Message -
From: "Uri Guttman" <[EMAIL PROTECTED]>
To: "Joe Gottman" <[EMAIL PROTECTED]>
Cc: "Perl6" <[EMAIL PROTECTED]>
Sent: Friday, January 03, 2003 10:06 PM
Subject: Re: "my int( 1..31 ) $var" ?
> > "JG" == Joe Gottman <[EMAIL PROTECTED]> writes:
>
> JG> Speaking of
> From: "Joe Gottman" <[EMAIL PROTECTED]>
> Date: Fri, 3 Jan 2003 22:25:16 -0500
>
> > > "JG" == Joe Gottman <[EMAIL PROTECTED]> writes:
> >
> > JG> Speaking of which, is there a run-time test to check if a variable
> is of
> > JG> integral type? Something like
> >
> > JG> print "dat
26 matches
Mail list logo