Re: RFC 324 (v2) Extend AUTOLOAD functionality to AUTOGLOB

2000-10-01 Thread Nathan Wiger
=head1 CHANGES Comments received have been that it would be better to use AUTOSCALAR, AUTOHASH etc instead of AUTOGLOB in the interests of encapsulation. The argument being that if you only want to implement AUTO scalars in your program, then doing: Cif($type_of_thing eq 'scalar') {

Re: RFC 324 (v1) Extend AUTOLOAD functionality to AUTOGLOB

2000-09-27 Thread Nathan Wiger
The AUTOGLOB subroutine should expect to take two parameters, the invocant, and a second parameter specifying what type of item is being AUTOGLOBbed, followed by - in the case of a sub - the sub's arguments. We suggest that the second parameter should be a scalar value - 'scalar' for an

Re: RFC 23 (v5) Higher order functions

2000-09-19 Thread Nathan Wiger
Damian Conway wrote: That's it! I'm gonna take that whole section out and burn it! ;-) $1 is the *only* place in Perl where an index starts at 1. *It's* the one that's inconsistent. Fix *it*. I'd love to. But we're stuck, unless we make a $CMD which holds what $0 currently holds, which I

Re: RFC 153 (v2) New pragma 'autoload' to load functions and modules on-demand

2000-09-19 Thread Nathan Wiger
Tom Christiansen wrote: Mostly harmless. Right before raising the famous "Can't locate method ..." error, Perl should check to see if Cautoload is in effect. If so, it should read the Cautoload.conf config file and ... ***LINEARLY READ A FLAT FILE!!?!?!*** I didn't get into the guts too

Re: RFC 23 (v5) Higher order functions

2000-09-18 Thread Nathan Wiger
=head2 Choice of notation The placeholder notation has been chosen to be consistent with the eisting Perl scalar notation (but using a ^ prefix rather than a $): RoleScalar Placeholder var analog named

Re: RFC 238 (v1) length(@ary) deserves a warning

2000-09-16 Thread Nathan Wiger
Michael G Schwern wrote: I'm surprised there hasn't be a good overhaul of the prototyping system proposeed yet. Your length() propsal wouldn't be the only think that can't be prototyped. print() is the simplest example. I think print should probably become something like what Eryq

Uninitialized value warnings should die (was Re: RFC 212 (v1) Make length(@array) work)

2000-09-13 Thread Nathan Wiger
Nathan Torkington wrote: Turning Perl into a nagging harpie means that the really important warnings will be ignored. This line of thinking brought to you by Mark-Jason's excellent talk on data typing. I agree, and just read MJD's paper the other day (nice job, BTW), but unfortunately

Re: RFC 132 (v3) Subroutines should be able to return an lvalue

2000-08-31 Thread Nathan Wiger
Johan Vromans wrote: You can do that easily: sub param { my ($self, @rest) = @_; $self-{aval} = @rest if @rest; # See note lreturn $self-{aval}; } I've been thinking about this for a couple days. The only problem I see is that this doesn't allow me to do this:

Re: RFC 174 (v1) Parse Cfunc($obj, @args) as Cfunc $obj (@args)

2000-08-30 Thread Nathan Wiger
Tom Christiansen wrote: But I will *not* relish typing STDERR-print("darn") Agreed. The day this is required is the day Perl stops becoming fun and starts becoming C++. No matter what, I think that any basic script should be able to be written without any -'s. One goal of my RFC was

Re: RFC 174 (v1) Parse Cfunc($obj, @args) as Cfunc $obj (@args)

2000-08-30 Thread Nathan Wiger
Damian Conway wrote: Nor I. That's why I'd advocate mandatory braces on indirect objects. I'd rather: print {STDERR} "darn" any day. Sorry, I'm way against that. If you're going to force that, then just enforce: STDERR-print("darn") Same amount of typing. Indirect objects

Re: RFC 154 (v1) Simple assignment lvalue subs should be on by default

2000-08-25 Thread Nathan Wiger
Chaim Frenkel wrote: NW$old = assign($var, $val); NW$old = assign($var) = $val; NW$old = assign = $var, $val; I don't think that the assigned values should be moved by perl into the argument list. You are reintroducing another version of the list flattening problem. "Where

Re: RFC 154 (v1) Simple assignment lvalue subs should be on by default

2000-08-24 Thread Nathan Wiger
Chaim Frenkel wrote: Why this limitation? If the lvalue is a fundemental type (whatever that is) everything works as if the lvalue were actually in place sub foo { return $a } foo =~ s///;# same as $a =~ s///; This is not the type of lvalue sub that this RFC

Re: RFC 57 (v1) Subroutine prototypes and parameters

2000-08-08 Thread Nathan Wiger
True. I wonder if we could change '=' to always quote the lhs, even if prefixed by '$', '@', or '%' (maybe we should only enable this behaviour inside parameter lists?) That would allow us to do this. That's gonna take some digestion time. In the meantime, is there a reason the

Re: RFC 57 (v1) Subroutine prototypes and parameters

2000-08-08 Thread Nathan Wiger
Er, I thought we were talking about setting named parameters, not default values. sub foo ($name = 'Fred', $age = 32) { # defaults # do stuff with $name and $age } foo('Barney', 31); # Positional assignment foo($age:31,