Darren Duncan <[EMAIL PROTECTED]> writes:
> At 7:10 AM +0100 3/29/05, Piers Cawley wrote:
>>Doesn't that rather depend on the type of the attribute? Personally, if I get
>>an object back from accessor method then I expect that any modifications of
>>that object's state will be seen the next time I
Craig DeForest wrote:
Yet another point: there are plenty of non-obvious reductions that people
worry about, such as "N m" -> "J" (energy) but "m N" -> "m N" (torque); but
it's probably not worth worrying about such things: if the coder knows that
s/he wants a torque, s/he should be able to ask f
Piers Cawley writes:
> Larry Wall <[EMAIL PROTECTED]> writes:
>
> > I've been thinking about this in my sleep, and at the moment I think
> > I'd rather keep .foo meaning $_.foo, but break the automatic binding
> > of the invocant to $_. Instead of that, I'd like to see a really,
> > really short
Zhuang Li wrote:
Yes. I think it's both useful and fun. I was thinking something similar
to
@[EMAIL PROTECTED] = map{1} @a;
But getting "$hash->{E1}->{E2}->...->{En} = 1;" instead of "$hash{E1} =
1; ... $hash{En} =1;".
What I'd really like to do is:
Given @a = ('E1', 'E2', ..., 'En');
@b
Zhuang Li writes:
> Yes. I think it's both useful and fun. I was thinking something similar
> to
> @[EMAIL PROTECTED] = map{1} @a;
>
> But getting "$hash->{E1}->{E2}->...->{En} = 1;" instead of "$hash{E1} =
> 1; ... $hash{En} =1;".
Yeah, like this:
%hash{dims @a} = (1) xx Inf;
> What I'd r
Aaron Sherman writes:
> On Mon, 2005-03-28 at 13:38, Luke Palmer wrote:
>
> > Your "list mod" idea is interesting, though. I fear that adding too
> > many list operators will start to make us look like Haskell, where we
> > have *extremely* expressive single lines that take an hour to write and
>
Larry Wall wrote:
Yeah, I agree. How 'bout we go with something like you have to *
the actual hash (if it's the first thing) to make it look like a
list of pairs to the parser, and we can just get rid of 3 there.
I'm not sure if 3) was superflous depending on the definition of "non-pair".
Did you
Craig DeForest wrote:
Yow -- units would be extra cool for perl6: I know of no other language that
has units support built in. It would go a long way toward making perl6 the
language of choice for students in the physical sciences...
Well, my HP48 pocket calculator used to have it :)
--
TSa (Tho
Craig DeForest wrote:
Yow -- units would be extra cool for perl6: I know of no other language that
has units support built in. It would go a long way toward making perl6 the
language of choice for students in the physical sciences...
Frink is built around this idea: http://c2.com/cgi/wiki?FrinkL
Luke Palmer skribis 2005-03-29 6:14 (-0700):
> method iterate () {
> for (@.objs) {
> .process($_); # oops
> }
> }
There is an alarming similarity with
for (@hashes) {
.($_)
}
Which doesn't quite use $self! .<>, .[], .{} are method calls, vi
On Tue, Mar 29, 2005 at 06:38:31PM +0200, Juerd wrote:
(B: Luke Palmer skribis 2005-03-29 6:14 (-0700):
(B: > method iterate () {
(B: > for (@.objs) {
(B: > .process($_); # oops
(B: > }
(B: > }
(B:
(B: There is an alarming similarity with
(B:
(B:
Luke Palmer wrote:
So if you want things modified, you'd have to pass in a reference.
Arrays and hashes would not generally have this restriction, since we
pass references of those guys anyway.
But I would really like to see a declaration of any possible modification
in the interface of a sub. Othe
On Tue, 2005-03-29 at 11:38, Juerd wrote:
> Luke Palmer skribis 2005-03-29 6:14 (-0700):
> > method iterate () {
> > for (@.objs) {
> > .process($_); # oops
> > }
> > }
[...]
> $_ is the topic, and I think that if we have two topics, Perl gets as
> convoluted
Larry Wall skribis 2005-03-29 9:27 (-0800):
> and write _.method, which is of dubious merit. Or we could use `<>,
> `[], `(), and `method if we don't use ` for qx. I daresay `method
> would probably be used more than qx for many styles of programming.
Hey, look at that, backticks again :)
If t
Paul Seamons wrote:
To sum up...
If you are in a method then you get .method and it always works even if $_ is
rebound to something else.
I also have problems to perceive .method beeing bound to $_ from a
typing point of view: $_ is a dynamic variable in the runtime
environment, while the method i
> -Original Message-
> From: Luke Palmer [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 29, 2005 5:43 AM
> To: Zhuang Li
> Cc: Jeff Yoak; fwp@perl.org; perl6-language@perl.org
> Subject: Re: Unknown level of hash
>
> Zhuang Li writes:
> > Yes. I think it's both useful and fun. I was th
Thomas Sandlaà writes:
> Luke Palmer wrote:
> >So if you want things modified, you'd have to pass in a reference.
> >Arrays and hashes would not generally have this restriction, since we
> >pass references of those guys anyway.
>
> But I would really like to see a declaration of any possible modif
17 matches
Mail list logo