[Mono-list] C# changes

Zaphod j0k3rin@yahoo.co.in
Tue, 12 Nov 2002 03:10:48 +0530


On Mon, Nov 11, 2002 at 11:04:09AM -0500, Jonathan Pryor wrote:
> Well, I haven't used the new compiler, I've just read the presentation
> slides.  I would imagine that it would generate the same IL.

So this is a rebirth of the C++ void foo::bar() declaration model 
Right ?.. (old wine, new package). But well there's hype for you :-)
"New Feature" ... partial types ...

> I was thinking it would be a "pseudo-attribute", not a real attribute. 
> Something that the compiler understands and would recognize during
> syntax and semantic analysis, NOT something that would actually appear
> in IL.

Even then ... Attributes are meant to be evaluated during semantic analysis.
The class members are gathered in before that .... So a new hack which 
makes us evaluate the attr before SemAnalysis ...

Attributes are meant to add info after or during SemAnalysis, so class
defns should not depend on attributes to be collected correctly .... you
would be tearing your hair to do it cleanly (as per Dragon Book) ....

> > AFAIK, the new keyword approach is much cleaner for compiler implementation.
> 
> Not having written a compiler yet, I can't comment. 

Well I was an observer to a war about IndexerName , as the entries to the
symbol table are gathered before attribute analysis (generally)... And this
attribute needed to go back into the scope and change all references as well.

But well the DotGNU guys decided to evaluate the attribute in the grammar ..
and had a 24 minute discussion going nowhere fast with this .. My comment 
was merely drawn from the "flow of reason" there ... viz "public int 
array_access[int pos]" is nicer.

So hey, I'm not an expert either ...