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

Does C actually need ; {}[]?

Name: Anonymous 2017-02-28 4:18

Does it?

Name: Anonymous 2017-04-19 22:34

int x(10)
x(0) = 5


I don't think this is a good idea, as you've introduced a syntactic ambiguity between function calls and array access.

For example:

int result = x(0);

Is the right-hand side calling a function 'x' with argument 0, or retrieving the 0th element of array 'x'? This might not impact the compiler much, but it's awful for readability.

The programmer should not have to keep the whole symbol table in her head just to understand how the syntax is being parsed. Down that road lies C++.

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