Compiling with VS2015
Collapse
X
-
Yeah, I think this another one of those C99 things that MS never bothered to implement?Comment
-
Really? I stand corrected, I guess. I just remember something vaguely similar in C99-vs-C89 discussions.Comment
-
It turns out to be surprisingly hard to get an answer on this. There are claims both ways, including that it was left out of C89 by accident, and added to C90. It was certainly part of K&R. Here's the most definitive answer I found.
Is code like the following allowed? I am talking about the comma after the last function in the initializer. void f(void) {puts("f");} void g(void) {puts("g");} struct Funcs { void (*f[])(void); }; struct Funcs funcs = { f, g, }; I ask because it makes generating code a lot easier.
Scroll down to Dan Pop's answer, Nov 14, 2005
It turns out I was wrong: it was a standard C feature since "day one",
i.e. since K&R1 was printed. Retained by the standardisation committee
because "it provides flexibility in adding or deleting members from
an initializer list, and simplifies machine generation of such lists".Comment
-
Still, it is our moral duty and obligation as programmers to avoid inflicting any more C++ on the world
Rust is the next on my list of newflangled languages to investigate
All I want is a better C... specifically, C with better memory management, better strings and better arrays (including associative arrays), but with full C interop. Better C++ would also be acceptable... Rust is most likely isn't it, but we'll see.
P.S: I must say, though, that the D language itself is great, just the implementation is lacking. I will revisit it in a year or so, hopefully there will be some improvements...Last edited by t4nk; May 6, 2017, 19:53.Comment
-
Another option which might be interesting would be to target browsers directly with something like Scala.js.
EDIT: It has quite a big "runtime" (scala-library-as-js), but if you have game assets anyway they would probably dwarf that.Comment
-
Anyway, Rust is pretty interesting, but it's verbose, full of Ocaml-isms (I don't see any particular advantages in them) and poorly documented. It's probably a good replacement for Ada.
I also changed my opinion on D again It's more general purpose than Rust, the flaws have workarounds and, all in all, Angband should be rewritten in DComment
-
(Scala less so, but still a lot better than most things. Especially things that can target JS.)
Not sure if D can do ADTs, but you can probably hack something similar using macros.Comment
Comment