Re: Built-in properties vs. user-defined methods (was: 'is' and action at a distance)

2001-05-20 Thread macintsh
On 5/19/01 4:49 AM, Graham Barr wrote: > On Sat, May 19, 2001 at 06:41:29PM +1000, Damian Conway wrote: >> Graham wrote: >>> On Fri, May 18, 2001 at 10:36:59PM -0400, John Siracusa wrote: > print keys $foo.prop; # prints "NumberHeard" > print values $foo.prop; # prints "l

A couple of ideas about properties

2001-05-20 Thread Brent Dax
Note the time I sent this out. My mind may not be thinking quite straight at this point, so bear with me. First of all, the dot dispute. If we want a way to absolutely make sure we're checking a scalar's properties, why not reuse our keywords? $foo is constant; #sets $foo

Re: properties

2001-05-20 Thread Simon Cozens
On Sun, May 20, 2001 at 12:46:35AM -0500, Jonathan Scott Duff wrote: > my $a is true = 0; # variable property > my $a = 0 is true; # variable property > my ($a) = 0 is true;# value property Wow. Totally ETOOCONFUSING. -- "I find that anthr

Re: A couple of ideas about properties

2001-05-20 Thread Simon Cozens
On Sun, May 20, 2001 at 01:09:28AM -0700, Brent Dax wrote: > This also reads like English: > Is foo constant? Until you realise that in order to actually use it sensibly, you'll have to say something like if (is $foo constant) instead of (as I would prefer) if ($foo is constant) --

Re: 'is' and action at a distance

2001-05-20 Thread Michael G Schwern
On Sat, May 19, 2001 at 11:26:36AM +1000, Damian Conway wrote: > Not. The run-time property is set on the *value* in $Foo, not on the variable > itself. Change the value, change the properties. Ok, that makes me happy. :) -- Michael G. Schwern <[EMAIL PROTECTED]>http://www.pobox.com/~sch

RE: A couple of ideas about properties

2001-05-20 Thread Brent Dax
Simon Cozens: >On Sun, May 20, 2001 at 01:09:28AM -0700, Brent Dax wrote: >> This also reads like English: >> Is foo constant? > Until you realise that in order to actually use it sensibly, you'll have to say something like > if (is $foo constant) > instead of (as I would prefer) > i

Re: Perl, the new generation

2001-05-20 Thread Piers Cawley
Adam Turoff <[EMAIL PROTECTED]> writes: > It's also amazing how long some people can go without seeing a > statement modifier or non-default delimiters like s{}{};. In the > micro view, that's OK. In the macro view, it leads to Perl Mongers > meetings that feel more like AA: Which reminds me,

Re: properties

2001-05-20 Thread Uri Guttman
> "DC" == Damian Conway <[EMAIL PROTECTED]> writes: DC> The C is actually optional wherever it can be inferred, which is handy DC> for chained properties: DC> my $bar is Persistent Public Logged; DC> ... DC> return $bar is Open Smoking("non") Theme($theme);

Re: 'is' and action at a distance

2001-05-20 Thread Uri Guttman
> "LW" == Larry Wall <[EMAIL PROTECTED]> writes: LW> I think it would be better if we stilled two curds with one bone. We LW> can have a more obscure name, plus differentiate the prop tables at the LW> same time. So how 'bout we have two methods, such as: LW> $foo.variable_is

Slice refs

2001-05-20 Thread Peter Scott
Um, this is a tiny little diversion here prompted by something that came up on perl-beginners, of all places... it's not possible in perl 5 to make a reference to an array or hash slice without doing some copying. It would be nice if perl 6 made that possible. Maybe it already does and I have

Re: Slice refs

2001-05-20 Thread Damian Conway
Peter Scott wrote: > > Um, this is a tiny little diversion here prompted by something that > came up on perl-beginners, of all places... it's not possible in > perl 5 to make a reference to an array or hash slice without doing > some copying. > Hey, this is *Perl*! Of course i

Re: Slice refs

2001-05-20 Thread Peter Scott
At 01:31 PM 5/21/2001 +1000, Damian Conway wrote: >> Um, this is a tiny little diversion here prompted by something that >> came up on perl-beginners, of all places... it's not possible in >> perl 5 to make a reference to an array or hash slice without doing >> some copying. >>