Re: Namespaces, part 1 (new bits)

2004-10-07 Thread Michal
On Sun, 3 Oct 2004, Jeff Clites wrote: I think that no matter what the approach, there's an unavoidable mismatch between Perl and Python when it comes to variable naming, it's going to be a bit awkward to access Perl variables from within Python. ... 1) Treat Perl variables as having the

Re: Namespaces, part 1 (new bits)

2004-10-04 Thread Paul Seamons
I'll delurk here for a moment, I am of the opinion that there is not that much of a need to allow for simultaneous access to similarly named Perl data types in python. I am not aware of any CPA modules that export two or more of the same name but for different data types - such as $foo, @foo,

Re: Namespaces, part 1 (new bits)

2004-10-03 Thread Jeff Clites
More detailed responses are below, but some general comments first: I think that no matter what the approach, there's an unavoidable mismatch between Perl and Python when it comes to variable naming, it's going to be a bit awkward to access Perl variables from within Python. I don't see any way

Re: Namespaces, part 1 (new bits)

2004-09-30 Thread Leopold Toetsch
Jeff Clites [EMAIL PROTECTED] wrote: First off, Perl5 doesn't describe itself that way. The Camel states, Note that we can use the same name for $days, @days, and %days without Perl getting confused. While that's fine for Perl it doesn't help, if you want to access one distinct days from

Re: Namespaces, part 1 (new bits)

2004-09-29 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: Okay, so we've got two points of dispute: 1) Jeff doesn't think the sigil should be part of the variable name Which isn't practicable. We can't strip off the sigil for perl5. It's part of the variable name, $foo and @foo are different items. If you want

Re: Namespaces, part 1 (new bits)

2004-09-29 Thread Uri Guttman
LT == Leopold Toetsch [EMAIL PROTECTED] writes: LT If you want to use a perl5 module from Python which has both $foo and LT @foo exported, we can just pitch a fit. Everything else can be handled LT by the import module. LT And: we can't attach hints to the namespace lookup because you

Re: Namespaces, part 1 (new bits)

2004-09-29 Thread Jeff Clites
On Sep 29, 2004, at 2:53 AM, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: Okay, so we've got two points of dispute: 1) Jeff doesn't think the sigil should be part of the variable name Which isn't practicable. We can't strip off the sigil for perl5. It's part of the variable name,

Re: Namespaces, part 1 (new bits)

2004-09-25 Thread TOGoS
I think Guido might have made things a bit harder to separate out than you anticipate, unless I misread you. It appears that modules and classes are also imported into the same namespace as everything else in python. Yeah, I had that pointed out in private mail. At this point I'm a

Re: Namespaces, part 1

2004-09-24 Thread Jeff Clites
On Sep 23, 2004, at 9:53 AM, Dan Sugalski wrote: At 12:06 AM -0700 9/23/04, Jeff Clites wrote: On Sep 22, 2004, at 8:13 PM, Dan Sugalski wrote: At 7:32 PM -0700 9/22/04, Jeff Clites wrote: *) If a language wants different types of variables to have the same name, it has to mangle the names. (So

Re: Namespaces, part 1

2004-09-24 Thread Jonathan
On Wed, 22 Sep 2004 23:13:37 -0400, Dan Sugalski wrote: At 7:32 PM -0700 9/22/04, Jeff Clites wrote: On Sep 22, 2004, at 10:58 AM, Dan Sugalski wrote: *) There are three things that can be in a namespace: Another namespace, a method or sub, and a variable. *) The names of namespaces, methods

Namespaces, part 1 (new bits)

2004-09-24 Thread Dan Sugalski
Okay, so we've got two points of dispute: 1) Jeff doesn't think the sigil should be part of the variable name 2) Both Jeff and Jonathan have pointed out that languages we care about *do* have a combined function/varname store. (Though class names/namespaces seem to be separate) For point #1, I

Re: Namespaces, part 1 (new bits)

2004-09-24 Thread Chip Salzenberg
According to Dan Sugalski: I'm fine with mashing functions and variables into a single big mass... Me too (FWIW). And I think it'll work. PS: I've got the Glob Stick where I can reach it. -- Chip Salzenberg - a.k.a. - [EMAIL PROTECTED] I don't really think it is a

Re: Namespaces, part 1 (new bits)

2004-09-24 Thread Matt Fowles
All~ I personally thing that the suggestion of providing a base namespace PMC and letting each language create their own if they want overrides is a really nice idea. I think the base one should have the maximum number of distinct subspaces with special functions to access them (i.e. function,

Re: Namespaces, part 1 (new bits)

2004-09-24 Thread Chip Salzenberg
According to Matt Fowles: I personally thing that the suggestion of providing a base namespace PMC and letting each language create their own if they want overrides is a really nice idea. I can't speak to that. However: I think the base one should have the maximum number of distinct

Re: Namespaces, part 1 (new bits)

2004-09-24 Thread Jonathan Polley
On Fri, 24 Sep 2004 14:04:52 -0400, Dan Sugalski wrote: ... (Though class names/namespaces seem to be separate) ... I think Guido might have made things a bit harder to separate out than you anticipate, unless I misread you. It appears that modules and classes are also imported into the same

Re: Namespaces, part 1 (new bits)

2004-09-24 Thread Dan Sugalski
At 7:51 PM -0400 9/24/04, Jonathan Polley wrote: On Fri, 24 Sep 2004 14:04:52 -0400, Dan Sugalski wrote: ... (Though class names/namespaces seem to be separate) ... I think Guido might have made things a bit harder to separate out than you anticipate, unless I misread you. It appears that

Re: Namespaces, part 1 (new bits)

2004-09-24 Thread Jonathan Polley
On Fri, 24 Sep 2004 21:04:52 -0400, Dan Sugalski wrote: At 7:51 PM -0400 9/24/04, Jonathan Polley wrote: On Fri, 24 Sep 2004 14:04:52 -0400, Dan Sugalski wrote: ... (Though class names/namespaces seem to be separate) ... I think Guido might have made things a bit harder to separate out

Re: Namespaces, part 1

2004-09-23 Thread Jeff Clites
On Sep 22, 2004, at 8:13 PM, Dan Sugalski wrote: At 7:32 PM -0700 9/22/04, Jeff Clites wrote: One problem: Some languages (Scheme, for example, and arguably C) have a unified namespace for subs and variables. What to do there? The easiest thing would be to allow the languages to store into

Re: Namespaces, part 1

2004-09-23 Thread Jens Rieks
On Thursday 23 September 2004 09:06, Jeff Clites wrote: Why? Not to be snarky here, I'm curious. Just that if I set a global $foo = 5 in Perl, I'd want to be able to change it from Python as, foo = 5. From Python, I can't set it using $foo = 5, since that isn't syntactically valid in Python,

Re: Namespaces, part 1

2004-09-23 Thread Dan Sugalski
At 12:06 AM -0700 9/23/04, Jeff Clites wrote: On Sep 22, 2004, at 8:13 PM, Dan Sugalski wrote: At 7:32 PM -0700 9/22/04, Jeff Clites wrote: One problem: Some languages (Scheme, for example, and arguably C) have a unified namespace for subs and variables. What to do there? The easiest thing

Namespaces, part 1

2004-09-22 Thread Dan Sugalski
Okay, this is going to be a three parter. The second part is entirely structural, and mostly a matter of convention. (It's second because the sensible thing to do is go over the link Tim posted to the previous discussion and more or less Make It So. I'm having a hard time getting a solid chunk

Re: Namespaces, part 1

2004-09-22 Thread Brent 'Dax' Royal-Gordon
Dan Sugalski [EMAIL PROTECTED] wrote: *) The names of namespaces, methods subs, and variables do *not* collide. You may have a namespace Foo, a sub Foo, and a variable Foo at the same level of a namespace. Why? Perl can use sigil mangling here, as it does with variables; where else is this

Re: Namespaces, part 1

2004-09-22 Thread Dan Sugalski
At 12:01 PM -0700 9/22/04, Brent 'Dax' Royal-Gordon wrote: Dan Sugalski [EMAIL PROTECTED] wrote: *) The names of namespaces, methods subs, and variables do *not* collide. You may have a namespace Foo, a sub Foo, and a variable Foo at the same level of a namespace. Why? Perl can use sigil

Re: Namespaces, part 1

2004-09-22 Thread Dan Sugalski
At 11:23 AM -0700 9/22/04, Will Coleda wrote: On Wed, Sep 22, 2004 at 01:58:17PM -0400, Dan Sugalski wrote: Okay, this is going to be a three parter. The second part is entirely structural, and mostly a matter of convention. (It's second because the sensible thing to do is go over the link Tim

Re: Namespaces, part 1

2004-09-22 Thread chromatic
On Wed, 2004-09-22 at 12:21, Dan Sugalski wrote: Larry's told me that as far as he's concerned the sigil is now part of the variable name. So perl doesn't *have* a variable foo -- it has $foo, @foo, %foo, and so on. (Granted, methods/subs are foo, but for that I'm OK slipping some

Re: Namespaces, part 1

2004-09-22 Thread Dan Sugalski
At 12:33 PM -0700 9/22/04, chromatic wrote: On Wed, 2004-09-22 at 12:21, Dan Sugalski wrote: Larry's told me that as far as he's concerned the sigil is now part of the variable name. So perl doesn't *have* a variable foo -- it has $foo, @foo, %foo, and so on. (Granted, methods/subs are foo, but

Re: Namespaces, part 1

2004-09-22 Thread Will Coleda
On Wed, Sep 22, 2004 at 01:58:17PM -0400, Dan Sugalski wrote: Okay, this is going to be a three parter. The second part is entirely structural, and mostly a matter of convention. (It's second because the sensible thing to do is go over the link Tim posted to the previous discussion and more

Re: Namespaces, part 1

2004-09-22 Thread Jeff Clites
On Sep 22, 2004, at 10:58 AM, Dan Sugalski wrote: *) There are three things that can be in a namespace: Another namespace, a method or sub, and a variable. *) The names of namespaces, methods subs, and variables do *not* collide. You may have a namespace Foo, a sub Foo, and a variable Foo at

Re: Namespaces, part 1

2004-09-22 Thread Dan Sugalski
At 7:32 PM -0700 9/22/04, Jeff Clites wrote: On Sep 22, 2004, at 10:58 AM, Dan Sugalski wrote: *) There are three things that can be in a namespace: Another namespace, a method or sub, and a variable. *) The names of namespaces, methods subs, and variables do *not* collide. You may have a