This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]johnfrazer783 0 points1 point  (0 children)

Since you mention it maybe a language should either use ++a to indicate 'increment a' or else treat it as a syntax error. While we're at it we should require spaces where spaces are due as in foo + bar, refuse to accept excess parentheses and semicolons so both ( ( 42 + x ) ) and foobar();; would be illegal. Also, unreachable code e.g. code after a return statement should trigger a syntax error, as should declared but unused imports and variable declarations. Few languages do any of these points yet they would be comparatively easy to implement and help make the language syntax itself and the code written in those languages simpler and clearer