Dimensionality of program code
Stewart Gordon
smjg_1998 at yahoo.com
Sat Jan 19 09:22:41 PST 2013
On 18/01/2013 23:17, Era Scarecrow wrote:
<snip>
> For compatibility it does. Functions called without prototypes (even
> if they are later in the same file) default to return type int too. I
> can't think of any compilers that make it an error (although they should)
I guess the reason they don't is that such a compiler wouldn't be
following the C standard.
But it would be nice if we had a subset of C that omits such barbarisms
as this, and compilers for this subset. For that matter, would the
intersection of C and C++ reasonably qualify as such?
>> But Dennis could have easily designed it to use a newline instead of a
>> semicolon. Indeed, there are a number of programming languages that
>> basically do this.
>
> Maybe, but if you use a newline instead of a semi-colon, then you
> can't put multiple statements on the same line;
A newline as an alternative to a semicolon then.
> newlines and spaces are
> more formatting so they were likely rejected as part of the separator;
Not sure what you mean by that....
> That and if you write a very long statement line (several requirements
> in an if statement) not being able to break it up would make for very
> very ugly code.
<snip>
Then invent a line-splicing notation. It's what Visual Basic has done.
Stewart.
More information about the Digitalmars-d
mailing list