[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 6502 illegal opcodes questions



Kent Friis wrote:
Den Fri, 02 Jun 2006 21:53:25 -0700 skrev Michael J. Mahon:

Many years later, I think that the "offside rule" for delimiting
blocks simply by indentation is a very nice approach.  Why on
earth should white space, the most significant characteristic of
text to the human eye, be ignored by most programming languages?


For the same reason that comments, the most human readable text found
in a program, are ignored by the programming language. Whitespace is
an important part of making the program more readable.

A programming language that prevents me to use white space to make
code readable (because that would change what the code does) is just
as bad as one that prevents me from writing a comment where needed
(Actually, Visual Basic .NET does that in certain places. Yuck).

If you think about it, the same things that make it more readable
to a human can make it more "parsable" by a computer--and you'll
be much less likely to have a piece of code look different from
what it means.

Comments are still fine, and can also be delimited by the off-side
rule in many cases (though that isn't necessary).  A comment should
never repeat the meaning of a statement at the level of the language,
but should, generally, give the meaning of a statement or group of
statements at a higher level of abstraction.

-michael

Parallel computing for 8-bit Apple II's!
Home page:  http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it is seriously underused."