Hacker News new | past | comments | ask | show | jobs | submit login

Some of these things are stuff that I had already used in existing programs (far before C23 was invented), and a few others (e.g. #embed) are good ideas that I had also previously thought of wanting too. And, I didn't know that ={} for zero initialize was not previously considered valid (and, looking at the specification, it seems that I am not the only one), but nevertheless I had often used that too.

Another nonstandard function I often use if fopencookie, and another feature I often use is the Elvis operator, but on Wikipedia I do not see those things listed in the list of C23. And then, there is -fwrapv, which I also often use. Another thing I would want is dynamic argument lists (including but not limited to variable argument lists) constructed at run time, and the ability to control memory layout in some ways.

However, I would think that underscores would be better than using apostrophes for digit separation, to avoid messing up programs that expect the apostrophe to have its existing meaning (although I have been told that it conflicts with C++). I would think "0o" prefix for octal numbers would also be good, but it is too late to change it now. I also think that adding the Unicode string types might not be a good idea, since it might encourage APIs to use it in circumstances where it ought not to care about the character set (although it might be possible to cast the type, that just adds extra stuff). Programming languages and file formats should not assume that Unicode is the only character set, because it isn't. The source format should be ASCII (although non-ASCII bytes are allowed as well, it might be a potential security issue to allow them in some environments). I am not so sure that __has_include is really a good idea either; you can use #ifdef to check if something is defined, either already defined or by a command-line switch; it is better to allow specifying compile options to use or not use them that way instead, I think.

And, I also think that it isn't so good that the standards are not freely available, but that was always how it worked. They could change that (unlike some of the other problems with the C programming language) but they don't. At least, the drafts are available.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: