Re: RFC: [] as the solitary list constructor

2002-10-05 Thread Noah White
On Sunday, October 6, 2002, at 01:50 AM, Brent Dax wrote: > Parens don't construct lists EVER! They only group elements > syntactically. One common use of parens is to surround a > comma-separated list, but the *commas* are creating the list, *not* the > parens! > Following this rule would m

Re: Interfaces

2002-10-05 Thread Noah White
On Monday, September 30, 2002, at 08:23 PM, Michael G Schwern wrote: > OTOH, Java interfaces have a loophole which is considered a design > mistake. > An interface can declare some parts of the interface optional and then > implementors can decide if they want to implement it or not. The > u

RE: RFC: [] as the solitary list constructor

2002-10-05 Thread Brent Dax
Noah White: # I think needless obfuscation is treating $a = (10); as a # scalar instead # of a list reference containing one item when the rest of the the $a = # () are list references. I think needless obfuscation is treating $a = (10) differently than $a = 10. The latter is the behavior we'

Re: RFC: [] as the solitary list constructor

2002-10-05 Thread Luke Palmer
Larry Wall wrote: > > [ Stuff about how commas construct lists, not parens ] > Wow, somehow you've convinced me that all the problems I saw before aren't really there. Well, switch on the light, there's no monsters under the bed afterall. > : This has the added benefit that there is a significa

Re: RFC: [] as the solitary list constructor

2002-10-05 Thread Noah White
On Saturday, October 5, 2002, at 09:33 PM, Larry Wall wrote: > > > : Additionally, parentheses have one inconsistency which brackets do > not: > : This is the following case, already shown on perl6-language: > : > : $a = ();# $a is a list reference with 0 elements > : $a = (10);

Re: Draft Proposal: Attributes: "public" vs. "private"

2002-10-05 Thread Noah White
> >> Note that an alternate definition of "private" is often used, as >> follows: >> >> A "private" attribute is an attribute whose scope is restricted such >> that >> it may be accessed only within the class in which it has been >> declared, >> OR WITHIN ANY CLASS THAT INHERITS

Re: Draft Proposal: Attributes: "public" vs. "private"

2002-10-05 Thread Noah White
On Friday, October 4, 2002, at 07:39 PM, Michael Lazzaro wrote: [SNIP] > Definition: "private": > > A "private" attribute is an attribute whose scope is restricted such > that > it may be accessed only within the class in which it has been > declared. > It is not available

Re: RFC: [] as the solitary list constructor

2002-10-05 Thread Chip Salzenberg
According to Larry Wall: > I suppose we could make comma merely puke in scalar context rather > than DWIM, at least optionally. I rather like Perl 5's scalar comma operator. > : $a = ();# $a is a list reference with 0 elements > : $a = (10); # $a is the scalar 10 > : $a

Re: RFC: [] as the solitary list constructor

2002-10-05 Thread Larry Wall
On Tue, 24 Sep 2002, Luke Palmer wrote: : =head1 TITLE : : Square brackets are the only list constructor : : =head1 VERSION : : Maintainer: Luke Palmer <[EMAIL PROTECTED]> : Date: 24 Sep 2002 : Number: 362 (?) : Version: 1 : : =head1 ABSTRACT : : This RFC responds to the fury on perl6

RE: Draft Proposal: Attributes: "public" vs. "private"

2002-10-05 Thread Brent Dax
John Williams: # Personally, I hope they look like attributes. But if they # do, the perl5 # lvalue subs are not the way to do it. Why? Because an # lvalue sub returns # a lvalue which get set _after_ the sub returns. At that # point it is too # late for the sub to do anything useful wit

Re: Private contracts?

2002-10-05 Thread Allison Randal
On Sat, Oct 05, 2002 at 02:50:11PM -0400, Trey Harris wrote: > > Ah, but the usual case is this: > > You download from CPAN class A that depends on version 1.0 of class N. > You then download class B that also depends on version 1.0 of class N. > You create an application that uses both classes

Re: Draft Proposal: Attributes: "public" vs. "private"

2002-10-05 Thread John Williams
On Sat, 5 Oct 2002, Michael Lazzaro wrote: > Dan Sugalski wrote: > > > > There won't be any direct access to attributes outside class methods > > of the class that defines the attributes, unless Larry changes his > > mind in a big way. (And, honestly, probably not even then) Instead > > it'll al

Re: Draft Proposal: Attributes: "public" vs. "private"

2002-10-05 Thread Dan Sugalski
At 12:53 PM -0700 10/5/02, Michael Lazzaro wrote: >Dan Sugalski wrote: >> >> There won't be any direct access to attributes outside class methods >> of the class that defines the attributes, unless Larry changes his >> mind in a big way. (And, honestly, probably not even then) Instead >> it'll

Re: Draft Proposal: Attributes: "public" vs. "private"

2002-10-05 Thread Michael Lazzaro
Dan Sugalski wrote: > > There won't be any direct access to attributes outside class methods > of the class that defines the attributes, unless Larry changes his > mind in a big way. (And, honestly, probably not even then) Instead > it'll all be accessed via lvalue methods. If an attribute is exp

Re: Private contracts?

2002-10-05 Thread Trey Harris
In a message dated Sat, 5 Oct 2002, Allison Randal writes: > More useful: keep a site-wide or company-wide file of version aliases to > make sure everyone uses the same version, and to make upgrades to the > next version as simple as editing a single file. Ah, but the usual case is this: You dow

Re: Private contracts?

2002-10-05 Thread Allison Randal
On Fri, Oct 04, 2002 at 12:03:44AM -0400, Trey Harris wrote: > In a message dated Thu, 3 Oct 2002, John Williams writes: > > > On Thu, 3 Oct 2002, Trey Harris wrote: > > > > > Incidentally, has there been any headway made on how you DO access > > > multiple classes with the same name, since Larry

Re: Private contracts?

2002-10-05 Thread Chris Dutton
On Friday, October 4, 2002, at 06:23 PM, [EMAIL PROTECTED] wrote: > On Fri, Oct 04, 2002 at 09:13:45AM -0400, Chris Dutton wrote: >>> How exactly does one "weaken" a precondition? >> >> At least in Eiffel, if you redefine a method, you may not give it >> stringer preconditions than the original

Re: Draft Proposal: Symmetry between Attributes and Accessors

2002-10-05 Thread Dan Sugalski
At 10:58 AM +0200 10/5/02, Paul Johnson wrote: >On Fri, Oct 04, 2002 at 04:42:27PM -0700, Michael Lazzaro wrote: > > - An attribute and a method are _not_ typically implemented in the same >> manner. Treating the two as interchangeable might imply runtime >> overhead. > >Bah! I bet the intern

Re: Draft Proposal: Symmetry between Attributes and Accessors

2002-10-05 Thread Paul Johnson
On Fri, Oct 04, 2002 at 04:42:27PM -0700, Michael Lazzaro wrote: > [Draft Proposal: Symmetry between Attributes and Accessors] > > It is proposed that class attributes may be treated as functionally > equivalent to an identically named accessor method. In this manner, it > shall become irrele