Slashdot Mirror


Inside Visual Studio 2008

mlimber writes "Dr Dobb's Journal has a peek at what is new in Microsoft's Visual Studio 2008. Most of the features discussed in the article are related to .NET, web development, and the IDE itself. However, Herb Sutter, Microsoft software architect and chair of the ISO C++ Standards committee, blogged about some developments on the C++ front. This includes a significantly enhanced MFC for GUI building, and the inclusion of TR1 (library extensions published by the C++ standards committee, most of which have also been incorporated into the next C++ standard)."

32 of 127 comments (clear)

  1. twitter? by stoolpigeon · · Score: 2, Funny

    how can he not have been here yet? i'm not waiting forever.

    --
    It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
  2. Kudos to the Visual Studio Team by RuBLed · · Score: 4, Interesting

    All I could say is that the best tool for windows development just got better. The new feature that could impact my work most is LINQ. I dunno but the VS Team of M$ had been doing some good things...

  3. C99 yet? by hpa · · Score: 5, Interesting

    Do they actually have C99 support yet?

    1. Re:C99 yet? by ireallylovelinux · · Score: 3, Informative

      Uh, GCC doesn't even support C99 why would you expect MS to be?
      http://gcc.gnu.org/c99status.html

    2. Re:C99 yet? by Anonymous Coward · · Score: 5, Informative

      Kernel developers, system programmers and embedded developers do a lot of C, so does a lot of scientists who write in C instead of Fortran (as the restrict keyword in C99 solves the main issues with writing numerical code in C). Language runtimes tend to be written in C as well (e.g. the standard python distribution). So yes, people still write in C. Some developers (application developers for example), should naturally not write in pure C for most part (there are obviously some performance critical parts that are suitable for C).

    3. Re:C99 yet? by forkazoo · · Score: 4, Interesting

      Better question is: Do people still code in c?


      Sure, lots of people write new stuff in C all the time. But, even if nobody did that, there are still a ton of people with existing C codebases that they are still working with. IIRC, Win32, Carbon, and GTK+ are all C API's, even if they have bindings to other languages. Lots of video and multimedia stuff is done in C, like the Dirac reference implimentation, gstreamer, ffmpeg, etc. When people talk about how C is dead, and nobody writes anything in C, they generally mean that higher level languages are used to glue together a bunch of C.
    4. Re:C99 yet? by Per+Abrahamsen · · Score: 2, Informative

      Herb Sutter wrote in his blog (which was linked in the submission) that the only thing from TR1 for C++ not implemented was C99 support. So I guess not.

    5. Re:C99 yet? by JNighthawk · · Score: 2, Interesting

      Just to lend some more weight to this, Cryptic Studios, the developers of City of Heroes/Villains, code in straight C.

      --
      Wheel in the sky keeps on turnin'.
  4. Does it do real time error highlighting? by tieTYT · · Score: 2, Insightful

    Real time error highlighting is the MOST important thing to me when it comes to an IDE. If I forget a semi-colon the IDE should tell me as soon as I go to the next line that I'm missing a semi-colon. It shouldn't wait to compile or run my code, it should tell me as soon as possible. The last version of VS didn't do this (without a plugin), does this version?

    1. Re:Does it do real time error highlighting? by Saffaya · · Score: 2, Informative

      VS 2003 does not (C++) do real time error highlighting.
      You need to use 3rd party plug-ins.

    2. Re:Does it do real time error highlighting? by nxtw · · Score: 2, Informative

      I don't know what you consider a very long time but at least for VS 2005 you're wrong. It highlights your errors after you try to run your code. That's in no way closer to "real time" error highlighting than compiling my code manually.


      Visual Studio highlights errors in Visual Basic.NET code and has done this since at least 2003.

      I'm not sure why they can't extend this functionality to C#; the languages are very similar.
    3. Re:Does it do real time error highlighting? by plague3106 · · Score: 2, Insightful

      They could, but C# developers would crucify them. The community has been very vocal that they DON'T want that feature. Quite frankly, I agree. VB.net has been plagued with problems related to the "on the fly" compliation and letting you change code while the program is running. I don't want to type, fix, type fix. I'd rather get the implementation done and then compile to see if I messed up any syntax. It seems though that between Intellisense and automatic code formatting that I catch most syntax errors anyway. Forget a ; or closing brace somewhere, and watch the formatter screw everything up. Fix the syntax error and reformat, and everything is right again.

      I'm not sure how Eclipse manages to get away with this, but it certainly seems to slow things down quite a bit. I can remote desktop to my home computer and use VS2005/8 and notice no more lag than when typign in Notepad, but Eclipse will grind to a halt at times, not to mention having to force it to do it's Intelisense equivolent by hitting ctrl+space.

  5. Thanks for asking by Tony · · Score: 5, Insightful

    Fuck, yes.

    C++ sucks. It's a half-assed attempt at an object-oriented language, combining the easy memory model of C with the simple OO model of Simula. I used to think the only good thing about C++ was templates. Then I figured out that templates suck, too, because they're damned near impossible to debug, for most non-trivial bugs.

    I fuckin' *hate* C++. I'd much rather have to code straight C while being punched repeatedly by a baboon.

    Objective-C is much less ugly. But then, so is LISP. (Actually, LISP is a damned good language. It's just not *pretty*, in a strictly aesthetic sense.)

    So, to not be snide, there are *many* people who still code in C. There are many objective reasons to avoid C++. (This *was* about C++, wasn't it?)

    --
    Microsoft is to software what Budweiser is to beer.
    1. Re:Thanks for asking by iangoldby · · Score: 5, Interesting

      [C++ is] a half-assed attempt at an object-oriented language, combining the easy memory model of C with ...
      Took me a moment to realise you were being sarcastic.

      Seriously though, what's so difficult about the memory management model of C? I find it hard to think of anything much simpler. The great thing about C (IMHO) is that if you didn't write it, it won't happen.
    2. Re:Thanks for asking by epine · · Score: 4, Insightful

      The strangest possible criticism of C++ is the superiority of C. Unlike most languages, if you don't like a C++ feature (one that C doesn't have) you don't have to use it, and there is little or no runtime penalty imposed.

      The strangest possible criticism of C++0x templates is that they are impossible to debug. It is, after all, the primary focus of changes to the C++ template system to drive diagnostics to the appropriate surface (at long last).

      This is the fundamental advantage of a hammer over a pneumatic nail gun. The nail gun might be perfectly safe is used wisely, but human nature decrees that ultimately many people are going to file off the safety, leading to predictably gory anecdotes.

      Standardize instead on the hammer, this can never happen. Which is the principle virtue of C.

      C++ is probably the worst language ever devised to throw into a room full of monkeys. Many of the people who hate C++ most strongly have an underlying distrustful view of their peers as unwashed monkeys completely lacking in prudence, judgment, or impulse control.

      There are situations where C++ simply should not be used, in much the same way that surgery in an African aid hospital lacking electricity and hot water is not your preferred medical option. Under sterile conditions, with doctors you trust, the pros and cons of C++ balance out quite differently.

      I've been trying to put this sentiment into words for a long time. In development teams where dog-eat-dog survivalism holds sway (us against the world, me against my teammates, managers against the staff) C++ can only play out in the worst possible way.

      Armed with hammers instead (the C language), the tragedy of the commons can't degenerate nearly so far. The virtue of C is that you don't have to like or respect everyone else you work with, which is no small virtue given human is what it is.

    3. Re:Thanks for asking by master_p · · Score: 3, Insightful

      Buddy, only God (or Stroustrup) can write good c++ code. If you have the guts, read this. There are humongous flaws with the language (and I say this with 10 years of c++ experience).

      The concept of c++ is good: a language close to the bare metal that has the capability to abstract details so as that it reaches higher level language status. But in practice, it has incredible flaws; the implementation is *bad*. It could have been so much better...

    4. Re:Thanks for asking by swillden · · Score: 2, Informative

      Buddy, only God (or Stroustrup) can write good c++ code.

      Bull. I have written plenty of good C++ code, and I've read lots more, over the 16 years I've been using the language. C++ requires discipline, no doubt, but used correctly it can be both extremely productive and extremely efficient.

      If you have the guts, read this.

      Read it before, disagree with some of it, most of the rest is overstated, there are a couple of real, but avoidable, issues mentioned.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  6. wake me up in 1998 by epine · · Score: 3, Interesting

    Back in 1998 I would have welcomed a standard compliant C++ compiler from Microsoft. What Microsoft did support, it supported one level deep (e.g. namespaces, many template features) with unbridled hypocrisy.

    Fast forward to 2008, if Microsoft can't be bothered, others can, so now they bother. Kind of like arriving at a New Year's party at half past twelve. The champagne is gone, and when you make your grand entrance into the room full of glassy expressions, everyone slaps you on the back and says "hey, glad you could make it". Almost like being there.

    1. Re:wake me up in 1998 by Jugalator · · Score: 4, Insightful

      So you mean this means nothing to the millions of C++ programmers out there? Standard compliance on the by far most prominent OS tend to be a big deal, even if it's coming late. I very much agree with the "better late than never" saying here. If I wouldn't, that would mean I'd be pleased with an old non-compliant Visual C++ 6 compiler, which I would definitely not be.

      --
      Beware: In C++, your friends can see your privates!
  7. Is it any better than Visual Studio 6? by johannesg · · Score: 2, Interesting

    I still develop in Visual Studio 6. Yes, the language support is somewhat lacking (scope rules for 'for' get me regularly), but to me it just feels so much nicer to work in than the later versions of VS. As if this was the last version that was still for C++ developers: I neither want nor need to develop web pages, C# applications, .NET stuff, or whatever crap they added later, and I sure don't want it to be the focus of the package I'm working in, with C++ thrown in as an afterthought.

    Have they brought back the keyboard macro's? They were there in VS6 but I could never find them in later versions.

    1. Re:Is it any better than Visual Studio 6? by ThaReetLad · · Score: 5, Interesting

      Well, we're just completing the porting of approx 1 million lines of VC++6 to VS 2008, and I have to say it's been so worth it. The new compiler picks up on and warns about many more potential problems, and there's also the issue of whole program optimisation. Also the debugger in VS2008 is much better than the VC6.0 one. I have to say, I think VS2008 is pretty great. A lot of the niggly little problems in VS2005 have now been dealt with, and speaking as someone who is just now starting to write some C# after 9 years writing C++ the LINQ stuff and lambda expressions are just great.

      --
      You can't win Darth. If you mod me down, I shall become more powerful than you could possibly imagine
    2. Re:Is it any better than Visual Studio 6? by TheThiefMaster · · Score: 4, Informative

      Have you tried MSVC++ 2005?

      The debugger is leaps and bounds ahead of the VC6 one.
      It supports parallel building of multiple projects on multicore cpus / multiple cpus (massively reducing build time).
      Built in x86-64 compiling / debugging (local machine and network) support.
      It supports link-time code generation (a major optimization improvement). The Pro version also supports profile-guided optimization.
      It supports OpenMP multithreading extensions for C++.
      Many many other improvements.

      The C++ .net extensions are optional. And, in my opinion, crap. If you want to use .net, you're better off with C#.
      Note: VC++ 2005 Express Edition (the free version) doesn't come with the Windows Platform SDK, and if you don't install it is only good for developing C++.net apps.

      The ONLY advantages to VC6 are: that it links programs against the VC6 runtime dll, which comes with most versions of Windows, right back to some 9x editions, where with VC2005 it links against the VC8 runtime dll, which most people need to install / you need to distribute it with your program / you need to static link with it, resulting in a larger .exe; and that it supports building .exes that run on Windows 95.
      Basically VC6's only advantage is that it's old.

    3. Re:Is it any better than Visual Studio 6? by Anonymous+Brave+Guy · · Score: 2, Informative

      The ONLY advantages to VC6 are: [snip]

      I think you forgot a few. For one thing, VC6 is actually responsive as an IDE, and doesn't go into a trance for several minutes at the slightest provocation. For another, the online help is actually helpful: if you look up a C++ library function, for example, it tells you about the library function, and not some completely irrelevant class with a vaguely similar name in the .Net framework (after taking half a minute to fire up the help system before it does anything else). Then there's the browse toolbar, which was simple and effective, yet strangely is still missing several .Net-friendly versions later despite widespread criticism of its removal.

      Yes, at my office we also have people who prefer to use VC++ 6. Sure, there are some minor advantages in the later versions, but I think (and we've measured these things where it matters) that most of those you cited are over-rated. Many of us long for the days when we have a simple, responsive, usable IDE.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    4. Re:Is it any better than Visual Studio 6? by Anonymous+Brave+Guy · · Score: 2, Informative

      Yes, all of this stuff is C++ specific. VC++6 was a decent IDE for its time. When the first version of VS.Net came out, the architecture behind VS moved to a common core for all languages. That was fine if you were using something like C# or VB.Net, as they were new and you had all the .Net trickery to support them. However, a lot of useful stuff from VC++6, such as the browse toolbar I mentioned, couldn't be readily supported in this new multi-lingual architecture and therefore got dropped as MS effectively moved to the least common denominator.

      The problem is, while there is a lot of compensating value in more recent VS releases for those using the new .Net languages, the C++ world has been pretty much left out in the cold. In the debugger, we get modest improvements in autoexp.dat, but the managed folks get full visualizers. C++ (and C++/CLI, where applicable) have lagged behind in getting proper designers for forms and such. The help system is so horribly bloated and .Net-centric now that while MSDN used to be the poster child of good technical reference material it is now almost literally useless for a C++ developer. And yes, as mentioned before, the IDE's performance and usability absolutely sucks compared to VC++6, to the point where I have seen experienced developers confront management with some hard facts and refuse to use the "upgraded" versions until compelled to do so.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  8. Re:More like intellinonsense by josteos · · Score: 2, Informative

    installs Visual Asisst http://www.wholetomato.com/

    Yep. Works great now.

    (No, I don't work there. Just been a long-time customer.)

    --
    Save the Music; Save the World at http://www.TuneTriever.com (Our latest Android game)
  9. Developers, developers, developers, developers? by tieTYT · · Score: 2, Interesting

    As long as I've known that MS makes an IDE, I've always wondered why they charge for (some versions) of it. The majority of apps compiled on it get compiled to MS Windows binaries. People will need to buy Windows to use these apps. That means more money for MS as more people make useful/necessary apps. Where does MS benefit by charging for the development tools? It seems to me that there would be much bigger benefit to giving away the tools for free. Perhaps I'm greatly underestimating the chunk of change MS makes by selling their development tools. Is that it? Otherwise, please explain it to me.

    1. Re:Developers, developers, developers, developers? by Jellybob · · Score: 2, Informative

      Take a look at the Visual Studio Express range - it's not full featured, but they are given away for free. These days the only people paying for Visual Studio are people who want the Pro features, and software shops, who can usually afford to pay for the software that drives their business anyway.

  10. Upgrades to MFC? what upgrades? by master_p · · Score: 5, Interesting

    MFC - we are working on a huge update to MFC that should knock your socks off. I can't tell you too much right now, but this is closer than you might [think]

    What do they mean?

    Do they mean, perhaps, that widgets are now normal objects? no double-creation (first new Object, then object->CreateWindow).

    Could they mean that all widgets are destroyed in the same way? no object->DestroyWindow for some widgets, delete object for some other widgets?

    How about some serious memory management using shared pointers? no temp CBrush objects etc.

    How about layout management? all serious widget toolkits have that. It's 2008, we should not have to position widgets manually.

    What about the tab widget? in MFC, the tab widget is not a real widget: you have to manually hide and show controls upon tab click.

    What about the model-view-controller pattern? this is 2008, should I still manually copy edited data from widgets to the data model of my application? most other toolkits support the MVC pattern. Dialog Data eXchange is a joke, of course.

    How about the issue of message maps? Qt proves you don't need stinkin' message maps, which are hard to maintain, difficult to understand, and dangerous because casting is untyped and done through macros.

    How about MIME type support?

    These, and a lot more, are the issues that have driven developers away from MFC to Qt or WxWidgets. I have been maintaining a line of products based on MFC for the last 10 years, but this year I've decided I had enough: all the products are to be rewritten with Qt/WxWidgets. I will only approach MFC if it will approach Qt/WxWidgets quality.

  11. Microsoft Fails It by wandazulu · · Score: 2, Informative
    (For me, anyway). I still use VC 6 for C++ work simply because it was the last example of an IDE (I'm just talking IDE) that had everything I wanted; it was clean but more importantly, *fast*. I skipped the initial .net releases because of the lack of an upgraded C++ compiler and eagerly installed VS2005 to discover that MS had turned VS into a bloated monster that was slow to open do *anything* (the performance of Intellisense greatly improved my knowledge of MFC because it was easier to memorize all the methods than wait for it to show them to me), as well as having some bizarre GUI choices (tabbed windows with the close button off to the far side of the app, instead of on the tab itself???, plus the sliding windows (yes, I can dock them, but for some reason they would sometimes "undock"). Basically it didn't "feel" right to me.

    Plus they committed, in my opinion, the unforgivable sin of trying to push their _s* functions that they said were "safe" instead of ones like strncat, strncpy, etc. The first time I compiled some code in VS2005 I freaked...what are all these warnings? Then I discover it's Microsoft being "helpful" and I was annoyed. Then I realized they wanted to make my code entirely Windows-dependent (functions that start with _ are not standard) and I was enraged. What *really* enraged me was that you have to turn these stupid warnings off per project ...if there's a way to turn it off in the options dialog I have no idea where it is. What made me scream was that they word the warning in such a way as to think the *standard* calls the functions depreciated. Herb Sutter, you should be ashamed of yourself for letting MS get away with this.


    I will give VS2008 a chance, but VS2005 with all its "standards compliant goodness" was not enough to sway me from VS6. The bloated IDE + improper warnings has utterly soured me on developing for windows; I don't want to do .net...I write server based C++ software where fast isn't fast enough. VS2005 was also not fast enough. Maybe I'll just bite the bullet and learn to write in Vim and compile at the command prompt.

  12. Re:CL by plague3106 · · Score: 3, Interesting

    Why, righ here, of course.

  13. LINQ is over-hyped by Anonymous+Brave+Guy · · Score: 3, Insightful

    Just for the record, I think LINQ is a neat idea, and as a general principle I'm all in favour of strong abstractions and useful syntactic sugar in programming languages if these make code easier to understand and quicker to develop.

    However, I'm worried by a lot of the hype about LINQ that's been flying around in recent months. Earlier this week, I found a code sample in a blog post showing how to use LINQ to find all the items less than 10 in a list. It went something like this:

    from n in mylist
    where (n => n < 10)
    select (n => n)

    For reference, here's the equivalent expression in Haskell:

    filter (<10) mylist

    That's obviously a much more elegant representation of the idea, and while it's not as generic, you also have things like map and reduce available, and a lot more if you need it.

    If you don't like the functional syntax, Python's list comprehensions also provide a bit of flexibility, with less redundant clutter than the LINQ:

    [n for n in mylist if n < 10]

    Even using the standard library algorithms in C++98 — where, let's face it, the use of iterators and of algorithms with predicates is pretty unwieldy in the absence of good syntactic sugar — the code is about the same size as the LINQ version:

    find_if(mylist.begin(), mylist.end(), bind2nd(less<int>(), 10))

    This isn't intended to be a criticism of LINQ, because LINQ can do far more than just a simple filter operation on a single list. Rather, I am criticising those who over-hype a new technology as if it is the One True Way to solve all remotely related programming problems, and then apply a powerful, generic approach to a simple problem giving a ludicrously over-engineered result. See also: design patterns, template metaprogramming in C++, dynamically typed languages and web frameworks, monads for trivial I/O in Haskell, etc. Like all these other things, LINQ has a lot of potential to improve development when used in the right context, but I fear it will be overused just because it's new and heavily hyped.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    1. Re:LINQ is over-hyped by JamesNK · · Score: 2, Informative

      from n in mylist
      where (n => n < 10)
      select (n => n)
      That is just poor code. A more elegant example using LINQ would be:

      mylist.Where(n => n < 10)

      I have been using LINQ for the past couple of months and have found it fantastic.