On Fri, May 19, 2006 at 12:35:11PM -0700, Larry Wall wrote:
> If this isn't answering what you were asking, please ask s'more,
> and I'll try to reply when I'm not busy having a grandbaby.


> Packages, modules, classes, roles, subsets, enums, etc. all pretend they
> are packages for purposes of naming from a global root.  Any extra
> semantics are defined by the objects that support each type of declarator.
> But as container objects they all support the Package role, or some such.

The above paragraph is about half of what I was asking.  It contains a bit
of bad news: it imples that Parrot can't assume that each HLL only has one
namespace-ish class.  But I think that particular guilletine blade was
already on its way down.

The other half:

Your distinction between the type object and the class object is more than a
little disturbing to the current design issues I'm facing.  You write:

>     Foo.^{$x} call .{$x} on the type metaobject
>     Foo::{$x} call .{$x} on the package object

Two and a half questions and a proposal on that.

Q1: How do you disambiguate type from package in the Perl 6 namespace?
    Given a class Foo::Bar, is Foo::<Bar::> the package and Foo::<Bar> the
    type? Or what?

Q1.5: If I asked why the circumflex is in there, would I regret it?

Q2: What is the object reference relationship among Foo::, Foo::Bar the
    type, and Foo::Bar:: ?  (Where are the object reference arrows?)


In Parrotland, it seems at the moment that Parrot type objects might be best
implemented as specializations of Parrot namespace objects.  Consider:

  Defining a new class creates exactly one named object.
  Aliasing (e.g. importing) a class requires exactly one namespace operation.
  Removing a class requires deleting exactly one namespace entry.
  There is no confusion as to which object is "the" class object.
  There is no confusion as to what should be looked up where.

As something of a probing attack -- to provoke informative rebuttal -- I'd
like to propose that type objects should do Package.  What say?
Chip Salzenberg <[EMAIL PROTECTED]>

Reply via email to