At 02:00 PM 2/9/2004 -0500, Michal Wallace wrote:
On Mon, 9 Feb 2004, Melvin Smith wrote:
> My take on it is, since it is an intermediate language, we don't need
> ability to have keywords as variables. Compilers can generate all
> variables with names like $T01JHGJ_001

That can make it kind of nasty to debug
compilers. I'm trying to move pirate towards
generating names that match the actual
variables (though I do still use _000 counters)

Which can make it nasty, not having keywords as variables or naming them weird things? I assume you meant the latter, I agree, and my example was probably overexaggerated. You could simply mangle the high-level symbol name so if your language allows you to use 'if' as a variable, do $_if. Take your pick of the thousands of possibilities.

I will at least commit a patch so IMCC will immediately flag the
declaration of an illegal symbol name rather than allowing it
and then getting confused later.

Would it be valuable if all variables had (or could have)
a $ in front of them? The ones that match  /\$[PINS]\d+/
would still have implicit types, and anything else
would require a .local or .global for the type
declaration.

I know how I want to answer the question, but I'd be lying if I said I had actually put a lot of thought in it. Any solution can be made to work:

Possibilities:

1) Mangling scheme - potential issues with various languages as well
as potential issues with importing external symbols unless we all agree
on the same scheme.

2) Quoting symbol names - pretty much works in all cases but is a little
annoying for hand written code

I'll think more on the issues before giving an opinion since I'm sure there
are some people that have already thought on it more than me; Larry, for instance.


-Melvin




Reply via email to