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 s

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" f

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-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 b

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 wan

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 thi

Re: Namespaces, part 1 (new bits)

2004-09-25 Thread Sean O'Rourke
At Sat, 25 Sep 2004 00:53:25 -0400, > By the way, this isn't the list for it, but it would be cool if perl6 had > an interactive mode as good as python's. It's one of the few places I > think python has a compelling lead. I'm sort of partial to: perl -MTerm::ReadLine -le '$t = new Term::ReadLine

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

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 module

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 sam

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 > su

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, va

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

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 name

Re: Namespaces, part 1

2004-09-23 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 yo

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 would

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

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 multip

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 name

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 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 m

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 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 choc

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 p

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 ma

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 t