Originally Posted by
Mario F.
The C DI syntax is hateful, yes. That's my opinion. You want to argue that with actual arguments, shoot. Give me one reason why that syntax makes sense in anything C++. To me it even looks like it was hammered down onto C syntax with a bent nail and a rock for hammer.
All this time, I thought initializing arrays and structures WERE something C++. I simply don't understand your perspective. Why isn't it C++? From what I see, you seem to be saying that:
Code:
// C++
const int a[] = {0,0,0,0,0,0,3,0,0,0,0,42,0,0,0,0};
// Not C++
const int a[16] = { [6] = 3, [11] = 42 };
// used like
yz_bucket = a[pulse_prefix & 0xFu];
And I fail to see what is so "Not C++" about that.
Just stop with the "snob", other superlatives, and word games.
I'll stop, but hating something useful and productive just because it "isn't C++" is being that which I shall not speak of. If C++ has changed its design goals, then perhaps you are right, it isn't C++ anymore. But one of the goals was so that a programmer wouldn't want to "drop down" to C because it offered something C++ didn't. DI isn't strictly necessary, I agree with that, but it is very useful. If I am writing a decoder of some sort, non-volatile lookup tables become very central to the program. In those types of applications, DI can be a huge bonus. Is C++ supposed to be a language for systems programming, or not?