Re: Classes with several, mostly unused, attributes

2004-12-16 Thread Michele Dondi
On Wed, 15 Dec 2004, Abhijit Mahabal wrote: #!/usr/bin/perl -e $x = 1; Is this supposed to work? I would tend to consider it counter intuitive... #!/usr/bin/perl v6; $x = 1; Incidentally, and on a totally OT basis, I've noticed that Perl6 is supposed to have v-strings. But (current) 'perldoc

Re: Classes with several, mostly unused, attributes

2004-12-16 Thread Larry Wall
On Thu, Dec 16, 2004 at 10:42:35AM +0100, Michele Dondi wrote: : On Wed, 15 Dec 2004, Abhijit Mahabal wrote: : : #!/usr/bin/perl -e : $x = 1; : : Is this supposed to work? I would tend to consider it counter intuitive... It occurred to me as I was dropping off to sleep last night that it can't

Re: Classes with several, mostly unused, attributes

2004-12-16 Thread Larry Wall
On Fri, Dec 10, 2004 at 11:05:32AM -0500, Abhijit Mahabal wrote: : 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

Re: Classes with several, mostly unused, attributes

2004-12-16 Thread Abhijit Mahabal
Larry Wall wrote: On Fri, Dec 10, 2004 at 11:05:32AM -0500, Abhijit Mahabal wrote: : 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

Re: Classes with several, mostly unused, attributes

2004-12-16 Thread Smylers
David Storrs writes: On Dec 15, 2004, at 6:11 PM, Abhijit Mahabal wrote: S01 says: # Perl 5 code is not strict by default, while Perl 6 code is. But it should be easy to relax with -e or maybe even a bare version number: this would suck. Badly. We should not be optimizing for

Re: Classes with several, mostly unused, attributes

2004-12-15 Thread David Storrs
On Dec 15, 2004, at 5:36 PM, Abhijit Mahabal wrote: I think that slackness-on-demand is a better policy than strictness-on-demand, but that, again, is just my opinion Until now, the policy in Perl has always been that it is as slack and forgiving as possible, and you have to ask if you want

Re: Classes with several, mostly unused, attributes

2004-12-15 Thread Abhijit Mahabal
David Storrs wrote: On Dec 15, 2004, at 5:36 PM, Abhijit Mahabal wrote: I think that slackness-on-demand is a better policy than strictness-on-demand, but that, again, is just my opinion Until now, the policy in Perl has always been that it is as slack and forgiving as possible, and you

Re: Classes with several, mostly unused, attributes

2004-12-15 Thread Paul Hodges
--- David Storrs [EMAIL PROTECTED] wrote: . . . . Obviously, however @Larry decide it should be, is the way it'll be and nothing I can say will change that. Au contraire -- that's what this list is for. State your opinion, man! :) That said: this would suck. Badly. We should not be

Re: Classes with several, mostly unused, attributes

2004-12-15 Thread Luke Palmer
Paul Hodges writes: That said, it's the strange and usually VERY old script that doesn't start with use strict; use warnings; Moreover, it should be a clue to us that there's a shirt stating: #!/usr/bin/perl -w use strict; Hinting that this is the way you start a perl program.

Re: Classes with several, mostly unused, attributes

2004-12-15 Thread David Storrs
On Dec 10, 2004, at 11:05 AM, Abhijit Mahabal wrote: 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

Re: Classes with several, mostly unused, attributes

2004-12-15 Thread Abhijit Mahabal
David Storrs wrote: Incidentally, I just want to go on record as saying that the verbosity of class declarations in P6 is really starting to skeeve me. I keep reminding myself that these are the edge cases that are being discussed, that you don't need all this stuff for the common case

Re: Classes with several, mostly unused, attributes

2004-12-15 Thread David Storrs
On Dec 15, 2004, at 6:11 PM, Abhijit Mahabal wrote: David Storrs wrote: On Dec 15, 2004, at 5:36 PM, Abhijit Mahabal wrote: I think that slackness-on-demand is a better policy than strictness-on-demand, but that, again, is just my opinion Until now, the policy in Perl has always been that it

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.