Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

What would you change in C?

Name: Anonymous 2009-08-26 13:44

It's the time for the next revision of the C standard and for some reason they want your advice. What do you add, remove, rename, etc ?

Name: Anonymous 2012-02-24 20:42

>>162
* Prefix notation
Use GMP or define macros.
* Higher order functions
Already has them. See bsearch, qsort and signal.
* Closures
Use C++ lambdas or a context struct.
* Lexical scoping
Use C++ lambdas.
* Garbage collection
Implementation-dependent. Undefined behavior means that the standard does not state what happens to malloced regions when they are no longer reachable.
* First-class continuations
Use setjmp and longjmp with an implementation that lets you use jmp_bufs at any time after the caller returns.
* Tail-call optimization
Implementation-dependent. Some compilers already do it.
* Hygienic macros
Use nested scopes using do{}while(0), token concatenation, or inline functions.
* Full numerical tower
C has no operator overloading. How does it add bignums? Terrible!
* Code as data
Implementation-dependent. In some cases it's impossible because code and data are in different address spaces and code is execute-only. In other cases, casting a function pointer to a char * could return a string containing the C source of the function, and casting back could compile a string as C code. Those are all possibilities of undefined behavior.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List