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)."
twitter? (Score:3, Funny)
CL (Score:1)
Re:CL (Score:4, Interesting)
Kudos to the Visual Studio Team (Score:5, Interesting)
Re: (Score:1, Informative)
nice to get a quick overview of schema (for editing, nobody sane would anything except XML mode).
Re: (Score:1)
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.
Re: (Score:2)
Re: (Score:2, Informative)
where (n => n < 10)
select (n => n)
mylist.Where(n => n < 10)
I have been using LINQ for the past couple of months and have found it fantastic.
Re: (Score:2)
That is just poor code.
Indeed it is. As I said, my problem is not with LINQ itself, but with the people who are over-hyping it (and, yes, giving poor examples along the way).
Re: (Score:2)
Re: (Score:2)
The MySQL guys are like 75% of the way there (they already have pretty good
I dont blame anybody for why it is taking so long. I tried to get get my hands wet in the Linq provider stuff, and man is it tedious!
C99 yet? (Score:5, Interesting)
Re: (Score:3, Informative)
http://gcc.gnu.org/c99status.html [gnu.org]
Re: (Score:1, Redundant)
Re:C99 yet? (Score:5, Informative)
Re: (Score:2)
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: (Score:2)
Re:Thanks for asking (Score:5, Interesting)
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.
Re: (Score:2)
Re: (Score:2)
Well, dynamic memory management isn't even part of the language. It has to be handled by outside function calls malloc() and free(). Other than that, it's pretty easy.
Re: (Score:2)
Exactly. Don't write that statement to free memory, and you have a memory leak. Its an important line that needs to be everywhere, so why not have a tool that does it for you, ensuring you CANNOT forget it? That's one less kind of bug I need to hunt down, and I get my work done quicker.
Re: (Score:2)
Re: (Score:1)
Re: (Score:1)
Re: (Score:2)
For example, I do a lot of graphics/game programming as a hobby. For that, Garbage collected memory is really inappropriate (for a number of reasons, but most of all the need to release memory immediately with graphic
Re: (Score:1)
a.push_back(Foo());
a.clear();
This simple operation in C++ is annoyingly difficult in C.
You also could argue whether garbage collection is simpler.
Re: (Score:2)
Kinda my point (Score:2)
That's all I was saying.
I love C. The C memory model is dead simple, and I like that. If you make it, you clean it up. Or, part of the interface contract is that the library makes it, but the client cleans it up. Either way, the clean-up duties ar
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: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: (Score:2)
just look at the likes of QT and KDE great examples of great c++.
Re: (Score:2)
I started to read it. It's rather long, so I'll continue later.
Amazing, isn't it, that after years of C++ coding, I haven't found it particularly difficult. (There are corner cases, which are usually easy to avoid.) Interesting that I found the unreadable templated type definition fairly easy to read (if not immediately comprehending it). Odd that, for somebody complaining about C++, the author doesn't seem to have embraced it, talking about using arrays (which are holdovers from C that should not no
Re: (Score:1)
Re: (Score:3, 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.
Re: (Score:1)
Re: (Score:2)
http://news.bbc.co.uk/2/hi/health/3685791.stm [bbc.co.uk]
37,000 nail gun accidents a year. The damage one can self-inflict with C++ is also impressive.
That doesn't make C++ a bad tool, it just makes C++ a risky choice for work sites where the majority of workers are less than fully compliant with workplace safety procedur
Re: (Score:1)
There is nothing wrong with C.
I think that epine has it right, that a lot of the rancor over C and C++ is due to abuses of the languages made by unskilled hands. Just as you need the right tool for the job, you also need the right worker for the job. Even with the best tools, you still need an experienced plumber to keep the water in the pipes, and an electrician to keep high voltages out of people, etc.
C is hugely popular, and probably always will be. C++ was created to r
Re: (Score:2)
Re:C99 yet? (Score:5, Interesting)
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.
Re: (Score:3, Interesting)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2, Informative)
Re: (Score:2)
Do they actually have C99 support yet?
Doh, the spec isn't even finalized. If they had it in now, you'd complain that they were using unfinalized specs. But to answer your question, yes, it's coming in a free update scheduled for Q1 2008.
In addition, we will also be delivering TR1 support. Portions of TR1 are scheduled for adoption in the upcoming C++0x standard as the first major addition to the ISO 2003 standard C++ library. Our implementation includes a number of important features such as smart pointers, regular expression parsing, new containers (tuple, array, unordered set, etc), sophisticated random number generators, polymorphic function wrappers, type traits and more! We are not currently shipping C99 compatibility or support for special math functions.
Re: (Score:2)
The spec was finalized in 1999 (hence the name "C99", specifically ISO/IEC 9945:1999.) There has been a few TRs since then, but that's always the case.
Does it do real time error highlighting? (Score:2, Insightful)
Re: (Score:1)
Re: (Score:2)
Re: (Score:1)
I feel that VS is great at doing very high level things. For example, designing a UI or mapping tables to objects, etc. But when it comes to the BASICS, VS pretty much sucks ass. If you compare it to even the shittiest java IDEs, it falls flat on its face in this departme
Re: (Score:3, Informative)
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.
Re: (Score:3, Insightful)
Re: (Score:2)
"The community" is a pretty big group of people. I'm sure there are people that would like the functionality, and as long as you can enable/disable it, what's the issue?
Visual Studio 2005's C# functionality has on-the-fly code editing for minor changes.
Re: (Score:2)
Hmm, you seem to be right. It's present in 2008 as well.
Re: (Score:2)
Re: (Score:2)
Also, not sure what Eclipse does these days, but I wouldn't say NetBeans is slow because it checks for syntax errors, since there's a deliberate delay between the user stopping typing, and the IDE starting checking. The "forcing code completion" is weird, I'd think it woul
Re: (Score:2)
Re: (Score:2)
Re: (Score:1)
Re: (Score:2, Informative)
You need to use 3rd party plug-ins.
Re: (Score:1)
Re: (Score:2)
Re: (Score:2)
Along with a bit worsened performance due to having to real-time analyze every character you type, but for "modern" computers, this should be less of a hassle. The performance hit is clearly noticeable on this Athlon XP 1700+ though. Kind of funny, but I guess we adjust to what hardware we have, even if it means typing into pretty much a text editor becomes slower!
wake me up in 1998 (Score:4, Interesting)
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.
Re:wake me up in 1998 (Score:5, Insightful)
Re: (Score:1)
Re: (Score:1)
Re: (Score:2)
Fixed that for you. It's not the OS that's in question here. You don't even have to use the VC++ compiler in Visual Studio, much less is it the only choice for the OS.
Re: (Score:2)
Is it any better than Visual Studio 6? (Score:3, Interesting)
Have they brought back the keyboard macro's? They were there in VS6 but I could never find them in later versions.
Re:Is it any better than Visual Studio 6? (Score:5, Interesting)
Re:Is it any better than Visual Studio 6? (Score:5, Informative)
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++
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
Basically VC6's only advantage is that it's old.
Re: (Score:3, 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,
Re: (Score:2)
Re: (Score:3, 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 effectivel
std::auto_ptr is broken in VS2005 (Score:2)
Re: (Score:2)
And yes, it's easy to fix on your own. But you have to know of this bug before it bites you. I didn't, and spent a good half of a day debugging our code that was broken by it (it makes it worse that it does not necessarily crash near the cast) - by the end, I simply couldn't believe that the standard library implementation is broken that bad.
Re: (Score:2)
Re: (Score:1)
VS 2005 tips & tricks...says a lot about all the stuff u think is missing, but really isn't
Elastic tabstops? (Score:2)
Developers, developers, developers, developers? (Score:2, Interesting)
Re: (Score:3, Informative)
Re: (Score:1)
Re: (Score:1)
Re: (Score:1, Redundant)
Re: (Score:2)
Upgrades to MFC? what upgrades? (Score:5, Interesting)
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.
Re: (Score:2)
Office 2007 Ribbon Bar: Ribbon, Pearl, Quick Access Toolbar, Status Bar, etc.
Office 2003 and XP look: Office-style toolbars and menus, Outlook-style shortcut bar, print preview, live font picker, color picker, etc.
Internet Explorer look: Rebars and task panes.
Re: (Score:2)
I agree with many of your criticisms of MFC, but isn't it a bit of a joke to attack MFC for using message maps and macros if you're advocating Qt (completely with signals, slots, and not just macros but a whole preprocessor!) as an alternative?
Re: (Score:2)
Re: (Score:2)
On a side note, you absolutely can use boost
Microsoft Fails It (Score:3, Informative)
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
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
Re: (Score:2)
...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)...
You mean MS turned VC++ into that, maybe. VS is not that, I use VC# 2005 all the time and it works great. I don't use VC++, so your complaints against it may be valid, but they don't apply to the whole studio.
TR1 is not in VS2008 (Score:2)
Very, very little change for native code (Score:2)
Re: (Score:1, Offtopic)
Re: (Score:2, Informative)
Yep. Works great now.
(No, I don't work there. Just been a long-time customer.)
Re: (Score:2)
Re: (Score:2)