According to Dan Sugalski:
> At 11:58 AM -0700 9/28/04, Jeff Clites wrote:
> >On Sep 28, 2004, at 11:26 AM, Chip Salzenberg wrote:
> >
> >>According to Jeff Clites:
> >>>top-level namespace (say this is namespace #1):
> >>>{
> >>>   variables => { Foo => <PerlScalar PMC (or whatever)> },
> >>>   namespaces => { Foo => <PerlNamespace PMC, call namespace #2> }
> >>>}
> >>
> >>I think I get it.  You're replacing sigil characters and associated
> >>name mangling, turning it into explicit named categories, thus
> >>avoiding lots of anticipated string tricks.
> >
> >Yep, exactly.
> 
> And unfortunately dies a horrible death for languages that don't 
> categorize the same way as perl. :(

The horrible death you fear is unavoidable.  The variable categories
are an impedance mismatch that namespaces can't paper over.  Name
spaces have different dimensionality, if you will, in different
languages.  We can't *fix* that without changing the languages.

You said on IRC that the Perl/Python gap would have to be bridged with
one-shot namespace connection, something like Exporter.  (Perl "$a::b"
=> Python 'a.b', Perl "@a::c" => Python 'a.c', etc.)  So the import
process could use Jeff-style categories to get some handle on what's
being imported.  e.g.:

   parrot_alias(a, 'b',             # dest: Python is unified, no need for a category 
here
                a, 'b', 'scalar')   # src:  Perl is not unified, so source category is 
required

   parrot_alias(a, 'c',
                a, 'c', 'array')    # here's a different category, to get '@c'

or some such.  Yes it's ugly.  But if we can't fix a ditch, the least
we can do is put a big friendly warning sign on it.

> As well as being really inconvenient for those variables that can
> express multiple classes of behaviours simultaneously.

You only get categories for *syntactic* categories, where this
objection does not apply.  (These are *name* spaces.)
-- 
Chip Salzenberg               - a.k.a. -              <[EMAIL PROTECTED]>
 "I don't really think it is a question of bright people and dumb
  people, but rather people who can see the game they're playing and
  those who can't." -- Joe Cosby

Reply via email to