Re: flip flop xx Inf

2004-12-10 Thread Michele Dondi
On Fri, 3 Dec 2004, Larry Wall wrote: On Sat, Dec 04, 2004 at 01:11:30AM +0100, Juerd wrote: : What happens to the flip flop operator? Will .. in scalar context remain : the same? I don't think so. It's definitely a candidate for a longer Huffmanization simply in terms of frequency of use. On

Re: Arglist I/O [Was: Angle quotes and pointy brackets]

2004-12-10 Thread Michele Dondi
On Fri, 3 Dec 2004, Larry Wall wrote: On Fri, Dec 03, 2004 at 06:43:05PM +, Herbert Snorrason wrote: : This whole issue kind of makes me go 'ugh'. One of the things I like : best about Perl is the amazing simplicity of the input construct. Hmm. while () {...} for .lines {...} Looks like

Re: state vs my

2004-12-10 Thread Michele Dondi
On Fri, 3 Dec 2004, Brent 'Dax' Royal-Gordon wrote: Larry Wall [EMAIL PROTECTED] wrote: So optimizing to a state variable won't necessarily help your loop overhead, but it could help your subroutine overhead, at least in Perl 5, if Perl 5 had state variables. Best you can do in Perl 5 is an our

Re: iterators and functions (and lists)

2004-12-10 Thread Michele Dondi
On Sun, 5 Dec 2004, Matthew Walton wrote: At least we had the sense to call them subroutines instead of functions. Of course, that also upset the mathematicians, who wanted to call them functions anyway. Go figure. That might be because the mathematicians haven't heard of a variant of a function

Re: specifying the key Type for a Hash

2004-12-10 Thread Michele Dondi
OT On Mon, 6 Dec 2004, Luke Palmer wrote: Well, there's always domain and range, if we want to be mathematical. [snip] What you want here is domain and codomain. Which leads me to believe that you don't want either. For the record, in most connections range would be just as good. Indeed

Re: iterators and functions (and lists)

2004-12-10 Thread Michele Dondi
On Mon, 6 Dec 2004, Larry Wall wrote: to return an infinite list, or even return 0..., 0...; to return a surreal list. Either of those may be bound to an array Hope not to bark something utterly stupid, but... if one iterates over such a list, may it be that on the first Clast one really

Re: iterators and functions (and lists)

2004-12-10 Thread Matthew Walton
Michele Dondi wrote: On Sun, 5 Dec 2004, Matthew Walton wrote: At least we had the sense to call them subroutines instead of functions. Of course, that also upset the mathematicians, who wanted to call them functions anyway. Go figure. That might be because the mathematicians haven't heard of a

Re: state vs my

2004-12-10 Thread Alexey Trofimenko
On Sat, 4 Dec 2004 22:03:19 -0800, Larry Wall [EMAIL PROTECTED] wrote: On Sun, Dec 05, 2004 at 02:15:51AM +0300, Alexey Trofimenko wrote: : oh! that it. I've found example which could make it clear to me : : sub test { : return sub { : for 1..3 { :state $var = 1; :print

Re: iterators and functions (and lists)

2004-12-10 Thread Luke Palmer
Michele Dondi writes: On Mon, 6 Dec 2004, Larry Wall wrote: to return an infinite list, or even return 0..., 0...; to return a surreal list. Either of those may be bound to an array Hope not to bark something utterly stupid, but... if one iterates over such a list, may it be

Re: Undeclared attributes

2004-12-10 Thread Abhijit Mahabal
Dave Whipp wrote: Attributes are declared with Chas, but also have a unique signil C$.. So is it strictly necessary to declare them? Or rather, is it Cno strictly necessary -- i.e. is the following legal? no strict; class Foo { method bar { say $.a++ } } For the standard layout, I'd

Re: [CVS ci] class refactoring 1 - Integer

2004-12-10 Thread Luke Palmer
[ From p6i ] Patrick R. Michaud writes: On Fri, Dec 10, 2004 at 08:50:46PM +0100, Leopold Toetsch wrote: Not quite. It gives one value if one is true or 0 (false). This is more information then the perl5 implementation returns. The returned value (if any) is still true but usable, if I

Classes with several, mostly unused, attributes

2004-12-10 Thread Abhijit Mahabal
Consider a class (e.g., the hypothetical Geometry::Triangle) that can have several attributes (side1, side2, side3, angle1, ang_bisector1, side_bisector, altitude1 and so forth), most of which will not be needed for most instances of Geometry::Triangle. I know how this can be done in P5.

Undeclared attributes

2004-12-10 Thread Dave Whipp
Attributes are declared with Chas, but also have a unique signil C$.. So is it strictly necessary to declare them? Or rather, is it Cno strictly necessary -- i.e. is the following legal? no strict; class Foo { method bar { say $.a++ } }

Re: S05 question

2004-12-10 Thread John Macdonald
On Thu, Dec 09, 2004 at 11:18:34AM -0800, Larry Wall wrote: On Wed, Dec 08, 2004 at 08:24:20PM -0800, Ashley Winters wrote: : I'm still going to prefer using :=, simply as a good programming : practice. My mind sees a big difference between building a parse-tree : object and just grepping for