Trey Harris wrote:
A more practical application would be:
my $foo;
# Code which might or might not set $foo...
$foo //= 23;
# or
$foo is default(23);
In such a case, the Cis default just looks plain odd to me.
It is. More than that, it's plain wrong. Cis properties are
At 9:27 PM -0400 9/4/02, Ken Fox wrote:
Dan Sugalski wrote:
At 9:10 AM -0400 9/4/02, [EMAIL PROTECTED] wrote:
So, just to clarify, does that mean that multi-dispatch is (by definition)
a run-time thing, and overloading is (by def) a compile time thing?
No. They can be both compile time things or
Brent Dax wrote:
Aaron Sherman:
sub abs($num is int){ return $num=0 ?? $num :: -$num }
^
I believe that should be (int $num).
and there is a »abs« in core.ops.
Anyway, before implementing a bunch of builtins, it should be organized
a little, where they
From: Trey Harris [EMAIL PROTECTED]
Properties are meant to be out-of-band information; miko's
suggestion would have this property setting the *value* of
the variable.
Ah, but my exact point is that the default *isn't* set immediately. The
property is held until the sub is called. If the
On Wed, 4 Sep 2002 17:29:27 -0400 (EDT), Trey Harris wrote:
In a message dated Wed, 4 Sep 2002, Jonathan Scott Duff writes:
So, each time I use a hypothetical, I have to be concious of which
variables are currently in scope? Perl can't help be with this task
because how does it know if I
On Thu, 2002-09-05 at 01:47, Brent Dax wrote:
Aaron Sherman:
# Ok, so without knowing what the XS-replacement will look like
# and without knowing what we're doing with
# filehandle-functions (is tell() staying or does it get
# removed in favor of $fh.tell()) and a whole lot of other
On Thu, 2002-09-05 at 01:47, Brent Dax wrote:
Aaron Sherman:
The one thing I notice all over the place is:
sub abs($num is int){ return $num=0 ?? $num :: -$num }
Another thing I'm not sure on... how do you force numeric, but not
integer typing on a parameter? Is that Cnum[ber]? $var
On Thu, 2002-09-05 at 03:18, Leopold Toetsch wrote:
Brent Dax wrote:
Aaron Sherman:
sub abs($num is int){ return $num=0 ?? $num :: -$num }
^
I believe that should be (int $num).
and there is a »abs« in core.ops.
I'll remove that then, and replace it
On 5 Sep 2002, Aaron Sherman wrote:
On Thu, 2002-09-05 at 01:47, Brent Dax wrote:
Aaron Sherman:
The one thing I notice all over the place is:
sub abs($num is int){ return $num=0 ?? $num :: -$num }
Another thing I'm not sure on... how do you force numeric, but not
integer
In a message dated Thu, 5 Sep 2002, Luke Palmer writes:
Why would bitwise have anything but integer signatures. What does
4.56 | 2.81 mean? Also, should perl lossily convert real to int, or give
an error if it can't?
Seems to me that that's a decision that has to be made for each function.
(Sorry for responding to my own post, and on a tangential point at that,
but...)
In a message dated Thu, 5 Sep 2002, Trey Harris writes:
In a message dated Thu, 5 Sep 2002, Luke Palmer writes:
Why would bitwise have anything but integer signatures. What does
4.56 | 2.81 mean? Also,
On Thu, Sep 05, 2002 at 09:57:07AM -0400, Aaron Sherman wrote:
On Thu, 2002-09-05 at 03:18, Leopold Toetsch wrote:
Brent Dax wrote:
Aaron Sherman:
sub abs($num is int){ return $num=0 ?? $num :: -$num }
^
I believe that should be (int $num).
and
Erik Steven Harrison wrote:
Is it just me or is the 'is' property syntax a little
too intuitive? Seems like everywhere I turn, the
proposed syntax to solve a problem is to apply a
property.
That's because most of the problems we're discussing are solved
by changing the semantics of a
Erik Steven Harrison wrote:
I know that the property syntax is pseudo established,
but I'm beggining to become a bit jaded about all the
built in properties were building. What about good ol'
aliases?
sub hidden (str $name, int $force := $override) {...}
I'm not keen on it because it
Jonathan Scott Duff wrote:
This continues to make no sense to me. The hypotheticality of a
variable seems quite orthogonal to what you do with it (bind, assign,
whatever). Why should these two things be intimate?
Because what you do with a hypothetical has to be reversible.
And binding is
Ken Fox wrote:
I'm messing around with regex code generation by
converting first to a grammar. The modifiers seem
to need intimate knowledge of regex - grammar
conversion. This may be a quirk of my approach.
People using tree traversal or generating code
directly from the regex might see
On Wed, 2002-09-04 at 22:46, Ken Fox wrote:
rule iso_date { $year:=(\d{4}) -
$month:=(\d{2}) -
$day:=(\d{2}) }
You mean C \d4 , etc. I presume.
Damian Conway wrote:
I would imagine that modifiers would be passed some
kind of hierarchical representation of the rule
they're modifying (i.e. a parse tree of it), and
would be expected to manipulate that structure
representation.
Excellent. Will there be an abstract syntax for tree
Damian Conway wrote:
Because what you do with a hypothetical has to be reversible.
And binding is far more cheaply reversible than assignment.
Why not leave it in the language spec then? If it's too
hard to implement, then the first release of Perl 6 can
leave it out. Someday somebody might
On Thu, Sep 05, 2002 at 03:38:03PM +, Damian Conway wrote:
Jonathan Scott Duff wrote:
This continues to make no sense to me. The hypotheticality of a
variable seems quite orthogonal to what you do with it (bind, assign,
whatever). Why should these two things be intimate?
Because
On Thu, 2002-09-05 at 04:31, Damian Conway wrote:
sub hidden (str $name, int $force is aka($override)) {...}
Hang on a moment! In your original answer to this question, you used
the is named('alias') syntax, but now you are suggesting using the
sigil in the syntax. So, should it really be
This is still a monolith, but it's getting better. It's now stored in
P6C/Builtins/CORE.p6m in my tree. More functions are coded, and I now
differentiate between the functions that need external support (e.g.
POSIX/libc functions) and those that just need to be written (e.g.
sort).
I think I've
22 matches
Mail list logo