Re: RFC for $ME class variable (was Re: RFC 124 (v1) Sort order forany hash)

2000-08-24 Thread Nathan Wiger
Bart Lateur wrote: > > >I hate it, it's miserable. Too much hidden trickery and special cases. > > Quite the countrary, I should think. Have you seen the subs > self_or_default and self_or_CGI in the source of CGI.pm? Yep, if you check out my File::Remote module I hijacked them. Thanks again,

Re: PROTOPROPOSAL FOR NEW BACKSLASH was Re: implied pascal-like"with" or "express"

2000-08-24 Thread Bart Lateur
On Thu, 24 Aug 2000 02:02:06 +0200, Markus Peter wrote: >$one{two\three\four} instead of $$$one{two}{three}{four} Isn't that $one{two}{three}{four} -- Bart.

RFC 152 (v1) Replace $self in @_ with self() builtin (not $ME)

2000-08-24 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Replace $self in @_ with self() builtin (not $ME) =head1 VERSION Maintainer: Nathan Wiger <[EMAIL PROTECTED]> Date: 24 Aug 2000 Version: 1 Mailing List: [EMAIL PROTECTED] Number: 152 Statu

RE: PROTOPROPOSAL FOR NEW BACKSLASH was Re: implied pascal-like "with" or "express"

2000-08-24 Thread Brust, Corwin
-Original Message- From: Bart Lateur [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 23, 2000 7:00 PM To: [EMAIL PROTECTED] Subject: Re: PROTOPROPOSAL FOR NEW BACKSLASH was Re: implied pascal-like "with" or "express" On Tue, 22 Aug 2000 00:03:48 -0600 (MDT), Nathan Torkington wrote:

Re: RFC 152 (v1) Replace $self in @_ with self() builtin (not $ME)

2000-08-24 Thread Hildo Biersma
> =head1 TITLE > > Replace $self in @_ with self() builtin (not $ME) > Don't impose your religion on others. If people want 'this' instead of 'self', that should be just fine. It should be pretty easy to define the appropriate $ME-reader like this: use ObjectStyle 'self'; or use Object

Re: RFC 152 (v1) Replace $self in @_ with self() builtin (not $ME)

2000-08-24 Thread Dave Rolsky
On Thu, 24 Aug 2000, Hildo Biersma wrote: > Don't impose your religion on others. If people want 'this' instead of > 'self', that should be just fine. > > It should be pretty easy to define the appropriate $ME-reader like this: > > use ObjectStyle 'self'; > > or > > use ObjectStyle 'Java

Re: RFC 152 (v1) Replace $self in @_ with self() builtin (not $ME)

2000-08-24 Thread Michael Maraist
>sub do_stuff { >my $self = self; >$self->{STATE}->{something} = @_; >} > >sub error { >carp @_ if self->config('VerboseErrors'); >} I've never really seen anything like this before in other languages (Is that good or bad?). The closest is Java's odd use o

Re: PROTOPROPOSAL FOR NEW BACKSLASH was Re: implied pascal-like "with" or "express"

2000-08-24 Thread Randal L. Schwartz
> "Bart" == Bart Lateur <[EMAIL PROTECTED]> writes: Bart> On Tue, 22 Aug 2000 00:03:48 -0600 (MDT), Nathan Torkington wrote: >> Normally what you'd say is: >> >> with (%record) { >> >> } >> >> (look at me, using Larry's new ... operator :-) Bart> No you didn't. You typed four dots. T

Re: RFC 152 (v1) Replace $self in @_ with self() builtin (not $ME)

2000-08-24 Thread Nathan Wiger
Tom Christiansen wrote: > > It is? I don't see that this is a pain at all. It seems like > a beautiful point of homogenization. You don't force the user > to say $self; they could use $this if they wanted. Heck, they > don't need it at all. > > my(undef, @args) = @_; It's a pain if you

Re: RFC 152 (v1) Replace $self in @_ with self() builtin (not $ME)

2000-08-24 Thread Nathan Wiger
Hildo Biersma wrote: > > > =head1 TITLE > > > > Replace $self in @_ with self() builtin (not $ME) > > > > Don't impose your religion on others. If people want 'this' instead of > 'self', that should be just fine. Whoa! I'm not imposing religion on others. FAR FROM IT! Maybe the examples I demo

Re: RFC 152 (v1) Replace $self in @_ with self() builtin (not $ME)

2000-08-24 Thread Bart Lateur
On Thu, 24 Aug 2000 13:27:01 -0700, Nathan Wiger wrote: >It's a pain if you want to support both function-oriented and >object-oriented calling forms, as CGI.pm does. For example, you can use >both of these: > > print header; > print $r->header; > >with CGI.pm. Now you need a self_of_default

Re: RFC 152 (v1) Replace $self in @_ with self() builtin (not $ME)

2000-08-24 Thread Randal L. Schwartz
> "Nathan" == Nathan Wiger <[EMAIL PROTECTED]> writes: Nathan> The key difference is this: $_[0] always contains the first method Nathan> argument, regardless of whether you're in an object-oriented or Nathan> function-oriented context. So, if you need to support both (like CGI.pm Nathan> and

Re: RFC 152 (v1) Replace $self in @_ with self() builtin (not $ME)

2000-08-24 Thread Nathan Wiger
Tom Christiansen wrote: > > So it seems that what you're saying is that you'd like a way to > *know* for certain whether you were invoked as a method -- or not, > as the case might be. Sort of. Actually, I want to not care. Adding a :method constraint doesn't help (actually hurts) because then t

Re: RFC 152 (v1) Replace $self in @_ with self() builtin (not $ME)

2000-08-24 Thread Tom Christiansen
>Currently, the current object context is passed into a sub as the first >element of @_, leading to the familiar construct: > my $self = shift; >However, this is a big PITA. In particular, if you support lots of >different calling forms (like CGI.pm), you have to check whether $_[0] >is a ref,

Re: RFC 152 (v1) Replace $self in @_ with self() builtin (not $ME)

2000-08-24 Thread Tom Christiansen
>It's a pain if you want to support both function-oriented and >object-oriented calling forms, as CGI.pm does. For example, you can use >both of these: > print header; > print $r->header; >with CGI.pm. Now you need a self_of_default special method, since >sometimes $_[0] has a class ref and