On Thu, 10 Oct 2002, Larry Wall wrote:
: Anyway, I don't see offhand why composition can't simply be done with
: attributes as it is in C++, especially since attributes manifest as
: methods outside the class. I don't think $car.cd.eject() is all that
: horrible to contemplate.
By the way, ever
On Fri, 11 Oct 2002, Larry Wall wrote:
: You can certainly drop it within the methods,
: since there's also the accessor methods.
But I should point out that there's a semantic difference between
$.foo and .foo, in that $.foo is guaranteed to get my copy of the
attribute, while .foo might just
On Fri, 11 Oct 2002, Michael Lazzaro wrote:
: On Friday, October 11, 2002, at 04:11 PM, Larry Wall wrote:
: has Nose $.snout;
: has Ear .ears is cut(long);
: has Leg .legs;
: has Tail $.tail is cut(short);
:
: method Wag () {...}
: }
:
: What's the rationale
On Tue, Oct 08, 2002 at 05:00:20PM -0400, Michael G Schwern wrote:
Unfortunately, Java doesn't ship with JUnit nor do Java libraries usually
ship with tests nor does a simple convention to run them nor an expectation
that the user will run the tests before installing. Score one for Perl. :)
On Friday, October 11, 2002, at 04:11 PM, Larry Wall wrote:
has Nose $.snout;
has Ear .ears is cut(long);
has Leg .legs;
has Tail $.tail is cut(short);
method Wag () {...}
}
What's the rationale again for the dot in $.snout? Does it imply that
it
On Mon, 30 Sep 2002, Michael G Schwern wrote:
: On Tue, Oct 01, 2002 at 01:36:19AM +0100, Simon Cozens wrote:
: [EMAIL PROTECTED] (Michael G Schwern) writes:
: method _do_internal_init ($num) is private {
:
: Just thinking aloud, would
: sub foo is method is private is integer
On Mon, 7 Oct 2002, chromatic wrote:
: On Wed, 02 Oct 2002 04:12:44 -0700, Michael G Schwern wrote:
:
: I like the class Vehicle is interface as a shorthand for declaring every
: method of a class to be an interface.
:
: Perhaps associating a property with a class can be shorthand for
On Mon, 7 Oct 2002, Andy Wardley wrote:
: Nicholas Clark wrote:
: I think that the first syntax
:
: class Car::Q is Car renames(eject = ejector_seat)
: is CD_Player renames(drive = cd_drive);
:
: makes it more clear that I'd like to pick and choose which methods
: the
On Wed, 02 Oct 2002 04:12:44 -0700, Michael G Schwern wrote:
I like the class Vehicle is interface as a shorthand for declaring every
method of a class to be an interface.
Perhaps associating a property with a class can be shorthand for associating
that property with every method of the
On Sun, Oct 06, 2002 at 06:17:37PM -0400, Daniel B. Boorstein wrote:
I think there may be some confusion here. In java, there's no special syntax
to declare a method an optional part of the interface. All concrete classes
that implement the Collection interface still must define full-bodied
On Sun, Oct 06, 2002 at 11:57:51PM -0400, Noah White wrote:
I wouldn't call it a dirty little secret as Michael put it :-).
This is the right thing to do within the context of a contract. The
contract does not guarantee that method functionality implemented by a
concrete class
In a message dated Tue, 8 Oct 2002, Michael G Schwern writes:
On Sun, Oct 06, 2002 at 06:17:37PM -0400, Daniel B. Boorstein wrote:
I think there may be some confusion here. In java, there's no special syntax
to declare a method an optional part of the interface. All concrete classes
that
On Tue, Oct 08, 2002 at 05:03:26PM -0400, Trey Harris wrote:
It really ought to be one of those sure you can do this, but please don't
things.
It's a RuntimeException. You can't require that all RuntimeExceptions be
declared if thrown;
snip
You can subclass RuntimeException. So if Sun
Nicholas Clark wrote:
I think that the first syntax
class Car::Q is Car renames(eject = ejector_seat)
is CD_Player renames(drive = cd_drive);
makes it more clear that I'd like to pick and choose which methods
the composite object gets from which parent.
But now you've
On Sunday 06 October 2002 09:57 pm, Michael G Schwern wrote:
On Sun, Oct 06, 2002 at 01:49:26AM -0400, Noah White 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
On Tue, Oct 01, 2002 at 04:01:26PM -0700, Michael Lazzaro wrote:
On Tue, Oct 01, 2002 at 03:43:22PM -0400, Trey Harris wrote:
You want something like
class Car is Vehicle renames(drive = accel)
is MP3_Player renames(drive = mp3_drive);
I *really* like this, but would the
On Sun, Oct 06, 2002 at 01:49:26AM -0400, Noah White 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
upshot
being
On Sunday, October 6, 2002, at 06:17 PM, Daniel B. Boorstein wrote:
[SNIP]
I think there may be some confusion here. In java, there's no special
syntax
to declare a method an optional part of the interface. All concrete
classes
that implement the Collection interface still must define
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
On Tue, Oct 01, 2002 at 05:04:29PM -0700, Michael Lazzaro wrote:
On Tuesday, October 1, 2002, at 02:49 PM, Michael Lazzaro wrote:
Which implies, I assume, that interface is not the default state of
a class method, e.g. we do need something like method foo() is
interface { ... } to declare
On Tue, Oct 01, 2002 at 04:01:26PM -0700, Michael Lazzaro wrote:
On Tue, Oct 01, 2002 at 03:43:22PM -0400, Trey Harris wrote:
You want something like
class Car is Vehicle renames(drive = accel)
is MP3_Player renames(drive = mp3_drive);
I *really* like this, but would the
On Tue, Oct 01, 2002 at 02:49:49PM -0700, Michael Lazzaro wrote:
My musing is that the behavior of a class in different contexts is
itself an interface, in the sense of being a contract between a
class/subclass and it's users
Ah HA! Contract! Return values can be enforce via a simple DBC
On Tue, Oct 01, 2002 at 03:43:22PM -0400, Trey Harris wrote:
You want something like
class Car is Vehicle renames(drive = accel)
is MP3_Player renames(drive = mp3_drive);
Either of those renamings is, of course, optional, in which case drive()
refers to the non-renamed one
On Tue, Oct 01, 2002 at 03:43:22PM -0400, Trey Harris wrote:
You want something like
class Car is Vehicle renames(drive = accel)
is MP3_Player renames(drive = mp3_drive);
I *really* like this, but would the above be better coded as:
class Car is Vehicle renames(drive
On Monday, September 30, 2002, at 11:19 PM, Michael G Schwern wrote:
On Mon, Sep 30, 2002 at 06:04:28PM -0700, David Whipp wrote:
On a slightly different note, if we have interfaces then I'd really
like to follow the Eiffel model: features such as renaming methods
in the derived class may
On Tuesday, October 1, 2002, at 02:49 PM, Michael Lazzaro wrote:
Which implies, I assume, that interface is not the default state of
a class method, e.g. we do need something like method foo() is
interface { ... } to declare any given method
Flippin' hell, never mind. You're almost
On Sunday, September 29, 2002, at 05:11 PM, Michael G Schwern wrote:
Here's some open problems:
Would this be the default behavior for overridden methods, or will the
parent class/methods have to be declared is interface for the
signatures
to be enforced on subclasses?
Heck, I'll jump
On Mon, Sep 30, 2002 at 10:12:48AM -0700, Michael Lazzaro wrote:
Heck, I'll jump into this one, since I've been working in _way_ too
many OO variations lately, some of them inflicted upon myself. While I
hope perl6 will allow extendable OO methodologies, the out-of-box one
needs to be as
Michael Lazzaro wrote:
What if a subclass adds extra, optional arguments to a
method, is that ok?
This is the scariest question, I think... In theory, yes, there are
lots of potential interfaces that would benefit from optional
extensions, I've made a few. In strict terms, though,
On Tue, Oct 01, 2002 at 01:36:19AM +0100, Simon Cozens wrote:
[EMAIL PROTECTED] (Michael G Schwern) writes:
method _do_internal_init ($num) is private {
Just thinking aloud, would
sub foo is method is private is integer is fungible {
be better written as
sub foo is
On Mon, Sep 30, 2002 at 06:04:28PM -0700, David Whipp wrote:
On a slightly different note, if we have interfaces then I'd really
like to follow the Eiffel model: features such as renaming methods
in the derived class may seem a bit strange; but they can be useful
if you have have
On Mon, Sep 30, 2002 at 11:16:20PM -0400, Michael G Schwern wrote:
How about seperated by commas, like any other list?
method foo is fungible, private, integer {
Well, if we're going to use a /list/, how about
method foo ($param) ^is (fungible, private, integer) {
?
:)
32 matches
Mail list logo