Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Static If I Had a Hammer
Feb 07, 2012 at 5:44 PMIt's up now.
Interactive Panel: Ask Us Anything!
Feb 07, 2012 at 3:45 PM@Kometes: "Wow, is there really a debate on what a module is?"
Yes. Sort of.
The standard's committee has been looking at modules for a long time. Like concepts, the earliest modules proposals fell due to trying to solve every problem. They included stuff with a standardized C++ ABI, DLL/SO interfaces, etc. All kinds of stuff that are interesting certainly, but really muddied the waters as to the purpose of the feature.
The current module proposal is much more focused. But the stuff from earlier modules proposals still lingers in their minds. What is needed is for someone big and important to step up and make a presentation that says, "THIS IS WHAT MODULES ARE FOR!"
Stroustrup is doing something similar with concepts, taking the whole thing to a minimalist, first-principles approach. That really needs to be the new push with modules as well. They exist for compilation reasons, nothing more, nothing less.
Static If I Had a Hammer
Feb 07, 2012 at 2:21 PMFirst, they provide a way to easily tell *exactly* what a type has to do in order to be used in a template. This prevents user code from having to parse through a million errors to figure out what went wrong. Yes, Clang is great in this regard, but it's still verbose over what concepts provide, and look at how much time clang's developers spent on getting those errors tamed. With a proper language feature, it's simple and trivial for compiler writers.
The second job, which `static if` cannot emulate, is verifying that the template *itself* uses the template parameter in the prescribed manor. This is *very important* during the development of a template. If you take a ForwardIterator, but you do -- on it, you've changed what your iterator means all by accident. This is an easy mistake to make and requires a lot of testing to find. Or you use concepts and get it for free.
At the same time, `static if` is much more free-form. It's #define, only it's actually part of the language. There are a lot of things you can do with `static if` that you can't with concepts.
`static if` is like a pencil, while concepts are like paintbrushes. They both can be used to "draw", but they make very different kinds of drawings. If you use pencils to "paint" a painting, you can only get black-and-white. That's better than nothing, but not nearly as good as if you had a paintbrush and a set of paints, is it?
GoingNative 3: The C++/CX Episode with Marian Luparu
Nov 01, 2011 at 10:46 AMI honestly don't mind Microsoft making C++/CX, in the general sense. Domain-specific language extensions are fine, and using them within those domains is fine.
My problem is that Microsoft spent precious compiler developer time on C++/CX that wasn't spent on C++11 support. Which is why VCNext's C++11 support is barely improved from VC10. No uniform initialization. No initializer lists. No varadic templates. These are major C++11 features that Microsoft just decided not to bother even trying to support. We won't see support for them until VCNext+1, if then.
Microsoft has shown that they don't have a commitment to the C++ language itself. That's my problem.