I wouldn't describe Java, C# or PHP as modern languages in that sense. LuaJIT is at least as fast as compiled C, and Lua as a language knocks the socks off C. (The same is true of a number of other languages.)
Posted Jun 29, 2012 21:05 UTC (Fri) by tjc (subscriber, #137)
[Link]
> Lua as a language knocks the socks off C.
C doesn't have socks, so I think you must be mistaken.
Why learn C? (O'Reilly Radar)
Posted Jun 30, 2012 5:22 UTC (Sat) by dirtyepic (subscriber, #30178)
[Link]
Socks were added in C11. Unfortunately they were almost immediately knocked off again, which explains why they can't be found in the spec.
Why learn C? (O'Reilly Radar)
Posted Jun 30, 2012 17:25 UTC (Sat) by tjc (subscriber, #137)
[Link]
Yes, and all those C11 socks start with an underscore (_Alignas, _Alignof, _Atomic, &c.) like some of their C99 predecessors. I realize there are reasons for this, but it's turning C into kind of an ugly language.
Why learn C? (O'Reilly Radar)
Posted Jul 1, 2012 5:04 UTC (Sun) by wahern (subscriber, #37304)
[Link]
Most of those have non-prefixed versions which you can get by including a header. For example _Bool has <stdbool.h>, which does #define bool _Bool. For _Alignof include <stdalign.h> and get alignof. <stdatomic.h> does the same for many other types.
In C anything that starts with an underscore followed by a capital letter, or anything which begins with two underscores, is reserved for future language extensions. That way, new extensions won't break existing code. If you want the intuitive names, include the headers.