Matt Gertz, the compiler development lead, has written an article in the latest edition of MSDN Magazine about VB’s background compiler technology. It’s a good expansion on the entries (part 1, intermission, part 2) that I wrote last year. Check it out!
Is there a way to define configuration properties (compilation constants) for the background compiler that are different that the active configuration? I am looking for a way for intellisense to see a property as an enum, and then when it’s compiled it is an integer. I know enums are essentially integers, but there is no way to set an enum property to an integer value using reflection that I have found. (I’ve tried switching configurations between coding and building but thats getting a bit tedious)
Thanks in advance, the article was very informative… even if I didn’t get what I was looking for.
Kellen, there isn’t any way to switch things like this at the moment – since Intellisense works off the active compiler, what you see is what we’re compiling….
Maybe I’m mistaken, but it seems VB Classic has a different model of backgorund compilation… First of, there’s the tokenization proccess and a one-line-at-a-time compilation. VB seemed not to bother much with the surrounding context, and it always seemed ok to me, since probably the user would be changing the context a lot.
The resulting intellisense seems to come from very specific parts of the text (type definition, constvariable declaration, method signature). In other words, VB Classic would not try to recompile the wolrd only to give me a precise list of, say, methods specific to the type being assigned (Delphi does this kind of selection, and I think it’s annoying, but then, maybe it’s just me).
I’m waiting for my DSL connection to arrive, so I can download the Beta 2 and try it. I’m still not sure if I really want to make the move from Classic to .Net (as much as departting to C# looks almost like changing sides with the enemy, to me… :-))
Branco, yes, VB6 had a very different compilation methodology – the VB .NET compiler was pretty much a rewrite from the ground up! Hope you enjoy Beta2 and let us know how it goes!
Pingback: Daniel Moth