Sam Vilain:
# > Okay, here's another shot at the semantics for objects [for
# perl 6].
# > If folks, especially non-perl folks, would look this over and chime
# > in, I'd much appreciate it.
# > Objects have (all optional):
# > *) Properties
# > *) Methods
# > *) Attributes
#
# Add to that:
# *) A superclass (obviously, but I consider it to be the
# same level as
# Properties, Methods and Attributes.)
Superclass*es*. Perl 5 has MI, and I don't expect that to change in
Perl 6. Parrot absolutely *must* support Perl, or it has failed in its
primary goal.
# *) Associations, eg in UML.
I've deleted your stuff about associations below, which described their
properties nicely, but didn't explain what they *are*. What are they
and when would you use them? Can they be implemented in terms of
properties and/or attributes?
# *) a set of Interfaces (similar to multiple inheritance; a way of
# grouping methods associated with a class for another to
# implement).
# eg, in Java and IDL.
Can this be implemented in terms of MI and/or delegation? (For Perl 6's
part, my understanding is that an interface is just a class that
inherits from Interface--although I could *easily* be wrong about that.)
# Are you going to implement the concept of `scope' of
# methods/attributes?
# Many other languages have it, and I think in some
# circumstances it can
# help clarify the intent of code. Of course anally requiring it to be
# specified ends up with a language like Java :-).
If you mean public/private, yes. If you mean lexically-scoped methods
and such...they have been proposed for Perl 6, although implementing
them is non-trivial.
# My humble opinion is that `public' attributes should just be
# implemented in
# terms of automatically generated accessor functions.
The attribute slots in a Parrot object are private to the object (and,
by extension, any classes it is a member of), so access will be mediated
through accessors.
--Brent Dax <[EMAIL PROTECTED]>
@roles=map {"Parrot $_"} qw(embedding regexen Configure)
>How do you "test" this 'God' to "prove" it is who it says it is?
"If you're God, you know exactly what it would take to convince me. Do
that."
--Marc Fleury on alt.atheism