Just a casual question here--how does the concept of shared namespaces relate to getting and using a bless()ed object in perl from a different language? Is this something that is dealt with at the Parrot level, or it it merely an attribute associated with a scalar that some PMC takes care of?
So say I want to the P6 DBI (assuming there needs to be a specific version), so I try to do something like this in Python (it's been a while, so Guido, don't shoot me! :D):
dbi=import perl6.DBI;
c=dbi.connect(...) etc etc
Now, C<c> is (presumably) a Perl scalar PMC. Is it also a namespace, in that there are a set of methods which can be called on this object? What are the considerations when dealing with something like perl's blessed references, which arguably have more than just a value associated with them?
Feel free to tell me "we don't care about this now; that comes later", "this is Larry's problem", or just "STFU: RTFM" -- I'm just trying to gain a more complete understanding.
Regards,
David
</delurk> ----- David Christensen Founder and CTO Yin Yan Software
On Sep 28, 2004, at 5:37 PM, Chip Salzenberg wrote:
According to Chip Salzenberg:According to TOGoS:Or explicit exports :) that way you only need to define the interface once, and then all unified-namespace languages can use it.
Asking Perl programmers to go out of their way to present foreign and unnatural interfaces is, well, foreign and unnatural for Parrot.
However, I should add that I'm sure there will certainly be some convenience tools provided very early on, which will do most of the "usual" and "expected" things for common cases.
For example, I'd be really surprised if there weren't a wrapper created quickly by someone[*] so that in Python you could say:
import perl5.File.Path
and get the appearance of what you asked for in your previous message: all the exported Perl functions and variables, but without the sigils.
But my point is that the namespace mechanism need not provide much support (or any, really) for this to work.
[*] Wrappers and adapters are all the rage in free software these days. (Whatever memetic plage it is that afflicts Java people seems to be contagious.) So it won't take long for people to write what I'm describing. Heck, we might do it ourselves, just so we can test the low-level interoperations more conveniently. -- 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