Re: Visual C++ 6 support issue

From: Daniel James (wastebasket_at_nospam.aaisp.org)
Date: 05/18/04


Date: Tue, 18 May 2004 16:12:25 +0100

In article news:<dmiha09l6cmbfg7ib0q14l7s7ncaf95d7p@4ax.com>, Joseph
M. Newcomer wrote:
> It is worth noting that Eclipse is developing a C/C++ version.
> Folks at Microsoft should note this effort. Sun may not become
> the only company which is Eclipsed...

Eclipse does seem very nice to use, I'm appreciating more and more of
its features as I get to know it better. Of course, Eclipse has the
great advantage that it is working with Java, which has a MUCH
simpler syntax than C++ and is much easier to parse and analyse.

At the ACCU conference in Oxford last month we had a lunchtime
session entitled "What is wrong with C++". The almost-unanimous
answer from those present was "the quality of tools support". One
person present actually went so far as to suggest that he used Java
in preference to C++ because support from tools like Eclipse and
JUnit made it much more productive for him (that provoked a ripple of
muttering from others present). I haven't really got to grips with
the refactoring tools that Eclipse offers for Java, but they do seem
potentially very powerful. The ability to do things like clicking on
a method in a class browser and select "rename" to have the
environment change the name of that method (but not other methods
that overload the name) everywhere in the code is nice -- and Eclipse
can do far more than that.

The trouble is that to do these things one has to perform basically
the same parsing job that the first couple of passes of the compiler
do. This is much harder to do in C++ than in Java because (a) C++ has
more complex semantics, (b) C++ has a macro preprocessor that adds an
extra level of complexity, and (c) C++ has templates which add an
extra two or three levels of complexity AND follow different rules
with respect to things like scope resolution from the rest of the
language. A C++ compiler is quite a tricky beast to write (which is
why there still aren't *any* commonly used commercial compilers that
manage to do it - I think the EDG compiler is still the only one and
that's only available through resellers like Comeau) so C++ tools
that have to incorporate the first (and trickiest) third of an entire
compiler aren't going to be terribly easy, either.

The best way to achieve good parsing for sourcecode tools like
browsers and refactoring tools is to get a compiler to do it. It's
not that easy, though, one can't simply take an open source compiler
(such as g++) and pull out the parser, because the parse needed by
browsing/refactoring tools is a different parse from that needed by
the compiler. The compiler can perform the preprocessing pass and
then throw away all knowledge of the original source and just parse
the processed output; sourcecode tools need to track both the
original and the preprocessed source so as to enable browsing of both
preprocessor symbols and language symbols (and of language symbols
used explicitly in the definitions of preprocessor symbols and
implicitly in macro substitutions).

The good news is that, also at the ACCU conference, Microsoft's David
Burggraaf (who is "Production Unit Manager Visual C++" - whatever
that means) gave in interesting talk about some of the new 'stuff'
coming in the next VC++. He spent most of his talk by telling us easy
it will be to pull legacy C and C++ projects in to VC and run them on
the .NET CLI and add managed code to them (should you happen to want
to do such a thing) with extensive reference to MS's port of the Open
Source Quake code to the CLI; but he did also mention that the new
environment will have much improved source browsing based on a new
browse engine which will parse the source as the project is loaded
(without having to do a full compile), and that the IDE will have
some simple refactoring capabilities.

The new VC ("palfrey"? "Whitebait"? ... "Whidbey", that's it --
whatever that means) should be available in public Beta later this
summer, they tell us. For the first time in a very long time I find
myself actually looking forward to being able to play with a new
release from Microsoft. that's refreshing.

Cheers,
 Daniel.
 



Relevant Pages

  • Re: Visual C++ 6 support issue
    ... Of course, Eclipse has the ... Apparently there is a discussion group going on in Microsoft which is discussing the tool ... >the same parsing job that the first couple of passes of the compiler ... And the compiler and the IDE are completely orthogonal. ...
    (microsoft.public.vc.mfc)
  • Re: Eclipse _mthclass$ problem
    ... > _mthclass$ to my compiled class file and when I compile the same ... Has anyone come across a way to get Eclipse to add this ... Eclipse does indeed have its own compiler that is an independent ... decide to use Sun's javac, you need to use Ant within Eclipse (right-click on ...
    (comp.lang.java.softwaretools)
  • Re: How Sun makes money from Java since it develops it and gives to everybody for free?
    ... converts from one high-level, OO, language (called "Java") to another, very ... but most of the bugs in javac or Eclipse seem to be (and have ... compiler and the Eclipse compiler might disagree on whether some code was legal ... since Eclipse uses Sun's JVM as the runtime for the code ...
    (comp.lang.java.programmer)
  • Re: Visual C++ 6 support issue
    ... Of course, Eclipse ... The parse is done by the compiler ... > Microsoft has tried to pass off as an editor) ... ...
    (microsoft.public.vc.mfc)
  • Re: #define and (brackets)
    ... The compiler doesn't second-guess. ... STRIZE is passed a value x as NUM. ... The preprocessor again creates ... it must evaluate the macro but this time instead of #NUM ...
    (microsoft.public.vc.language)

Loading