At 9:00 PM +0100 3/9/04, Leopold Toetsch wrote:
Dan Sugalski <[EMAIL PROTECTED]> wrote:
 While we still need to nail down the final bits of namespace stuff,
 I'm running into the need for it in IMCC code, so its time to finally
 deal with it.

I don't really care what the syntax looks like, so I'm proposing:

.namespace [foo; bar; baz]

While I see that's necessary it's not that simple ...

Oh, sure it is. :)


> as a way to set the current namespace for subs to foo::bar::baz. Any
 sub defined from that point on in the current source file will go
 into that namespace, unless the namespace is explicitly changed later
 on.

... because, what does it mean: "Any sub [..] will go into that namespace"?

Well, from what I've seen so far, you're slamming all subs into the base namespace, so that if I have IMCC code that does:


  .pcc_sub foo
  .end

there's a foo entry in the base namespace. Which is fine. What I want the .namespace (or whatever) thing to do is alter the default namespace that's used.

Anway, whe should really define, what are the duties of the PIR
assembler towards variable names, name mangling, lexical scopes,
namespaces, globals, and all that related stuff. We need it. It's not
defined.

Fair enough. Generally I don't want the PASM/PIR assemblers to do a whole lot, since I'm not sure it's a good idea. I was going to put this off a bit longer, but I see it's past time to do that.


This also gets into the decisions of what metadata goes into the bytecode files and what the bytecode loader is responsible for doing, unfortunately. So we get to revisit bytecode and metadata too. Wheee....
--
Dan


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to