C vs C++ vs Lisp (156)

21 Name: dmpk2k!NvI5dkBF.E : 2008-07-09 15:53 ID:Heaven

Things I'd love to see:

  • Null-terminated strings eliminated in favour of Pascal-style strings. In other words real strings, not an error-prone pointer hack.
  • The standard library cleaned up. Since strings know their length and are 8-bit clean, you can throw away some function and merge others. Also, function names and arguments can be made consistent.
  • Get rid of trigraphs.
  • Some form of local type inference.
  • I'd love to see computed gotos and labels-as-values become standard.

It'd still be C (other than the type inference), but it'd be a less error-prone and more pleasant language to use. The only reason I'd call it "2.0" is because the new standard library wouldn't be backward-compatible.

I'm undecided if strings should support Unicode. Unicode's the future, and it'd be nice to put unicode in string literals and have it Just Work, but have you seen the size of ICU? An is to make strings use machine words instead of bytes and leave ICU separate.

This thread has been closed. You cannot post in this thread any longer.