News for hackers. Stuff that matters.
Re:C++14 by dllthomas on Friday November 02, 2012 @11:51AM (#4733178)
Your first two paragraphs here seem contradictory. If the feature can already be implemented, and the cost is merely some syntactic messiness, then there is no change necessary to the runtimes - all you need is a little syntactic sugar.

As an aside, there is a grand history of array notation being nothing more than syntax. Try building the following in gcc:

  int main() {
      int foo[] = {1, 2, 3};

      return 1[foo];
  }
The expression a[b] is simply translated into a + b, which commutes. There's some constraint applied that something there be a pointer (so 1[2] is rejected) but it's weaker than it "should" be...
Re:C++14 by flebron on Friday November 02, 2012 @12:19PM (#4733310)
Sorry, I misspoke - I didn't mean the runtime (what would that really be?) but the compilers. That is, I do not know, a priori, that the internal type system would deal equally well with constant sized arrays, as with variable based ones. Currently the size of all variables on stack is determined at compile time, and the compiler generates code for those offsets. If this now changes, one would have to see what needs to change in the compiler internally, and the executable that gets output by it. It can certainly "be done", but things need to change in order to accomodate it as part of the language.