Inside Visual Studio 2008 127
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)."
Does it do real time error highlighting? (Score:2, Insightful)
Thanks for asking (Score:5, Insightful)
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?)
Re:Thanks for asking (Score:5, Insightful)
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.
Re:wake me up in 1998 (Score:5, Insightful)
Re:Thanks for asking (Score:4, Insightful)
Buddy, only God (or Stroustrup) can write good c++ code. If you have the guts, read this [yosefk.com]. 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...
Re:Does it do real time error highlighting? (Score:3, Insightful)
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.
LINQ is over-hyped (Score:4, 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.