Comment Re:Oh god so what? (Score 1) 193
C99 support there is still more like 50% (no VLAs, no "restrict", and no complex/imaginary).
C99 support there is still more like 50% (no VLAs, no "restrict", and no complex/imaginary).
It didn't make it for C++14, right? My understanding is that C++17 is where the "big things" are supposed to be happening - are you now aiming for that?
I believe this kind of polymorphism is already possible, between std::function and boost::any (and, of course, they're planning to add "any" as part of the standard in a future version).
C++ IDEs have also gotten much better, as well. In Visual Studio these days, you can hover over an identifier, and it'll tell you its actual type, regardless of how many levels of auto there are between it and the actual named type. And it works reliably on anything that is valid C++, no matter the complexity.
In fact, B had it as early as 1969, and it was 100% correct even on arbitrarily complex programs!
(It always inferred type "machine word", which was the only one that the language had.)
If you really can't live without it, there's always libgc.
The alternative might be polymorphic lambdas, which would require dynamic typing.
Polymorphic lambdas (which were added in C++14, in fact) don't require dynamic typing. They only require the ability to use template parameters for lambda arguments. In case of polymorphic lambdas, this is implicit (i.e. basically you can elide the type of the function parameter, and it will become a template parameter on the operator() for the type generated for that lambda).
You can definitely over-do auto typing to the point where a human can't figure out the types involved
Thing is, in most cases the human doesn't particularly care about the types involved. Provided that variables are named descriptively, I can look at a piece of code and figure out what it does, without having to determine whether "files" is a vector, a list or a deque, and whether the elements are raw, shared or unique pointers.
Every lambda is of its own unique type. Even if you have two lambdas with the same capture-list and parameters, they're still of different types.
It's a crying shame that C and C++ still haven't added safe arithmetic as part of the standard library (or in case of C, maybe even as part of the language, for the lack of operator overloading). Back when I first saw "checked" in C#, I wondered what this was supposed to be about, but I have since learned the wisdom of having it in the language.
This is not entirely true - they have added a bunch of C11 features in VS 2013.
VC++2013 added a bunch more stuff from C99, aside from the library. On the language side, it's mixing declarations with code (C89 mode was strict and would bark at any variable not at the beginning of the function), _Bool, compound literals, and designated initializers.
The main things still missing are "restrict", _Complex and VLAs. However, the official target is now C11 rather than C99, and C11 made VLAs an optional feature of the language, because of lackluster support and use.
It all depends on how bad and how accepted corruption is in any given society. In many, a public office is basically accepted as a seat in which to take bribes - it's the major perk of the job.
Nevertheless, this one came with the M2.
I don't think it really matters much who does it, so long as it's not the force that has to be maintained in the permanent state of thinking of other citizens as their potential enemy (since when they're deployed, it's always in the country). I suppose from a Constitutional perspective, National Guard makes sense since you want it to be a state-level force, otherwise it will be shot down as Federal overreach. There are also State Defense Forces, at least in some states.
The hardest part of climbing the ladder of success is getting through the crowd at the bottom.