[M3devel] "target specific pragmas"?
Rodney M. Bates
rodney.bates at wichita.edu
Fri Feb 15 23:41:09 CET 2008
I view this as more significant than it would first appear. More
important than readability is that delimiters with several letters
in all caps are more PROMINENT. This makes it quicker seeing the
overall structure of a piece of code before looking at the deeper
details such as which variable is being manipulated.
Up to now, every person I have discussed it with who has spent enough
time coding with this style of delimiters to get over their initial
aversion has agreed the prominence of all caps makes the code structure
easier to see quickly. Even Ada programmers who had significant prior
experience in Modula-2 have preferred all caps in Ada (Ada is case-
insensitive, so you can do it as you please.)
As for readability, I recall seeing research some years back that
showed all caps are less readable than lower case, that is, people
read all caps slower and/or with less accuracy. For the delimiters,
prominence is more important, especially since their vocabulary is
far smaller than that of identifiers and doesn't change from program
to program.
As for esthetics, speaking for myself, after many years, I still think
all caps reserved words are uglier than mud fences, but I happily accept
that as the cost of easier scanning of code.
It would be nice we had a standard character code that could handle
lower case, bold face, as in the Algol 60 "publication language".
That would be prominent and look great too.
Of course, someone could undermine it all by making all the identifiers
all caps too, loosing the quickly spotted reserved words, reducing readability
where it matters more, and, IMO looking even uglier. Fortunately, Modula-3
culture seems to prevent that.
Darko wrote:
> I don't really question the usefulness of any given feature, just the
> incremental cost of adding any given feature. One of M3's great
> strengths is that it is low on features, but the ones it has are
> powerful and well chosen.
>
> The comparison I meant in the typing discussion was between C and M3,
> not the length of symbols. C is a bit obsessive about source size,
> which was meaningful back in the day, but today is totally irrelevant.
> Even if you don't use macros on your editor, the amount of time spent
> staring and your code is much greater than the time you spend typing
> it. You could argue that BEGIN/END is easier to read than {/} but I
> think the more important point is that this issue is not a significant
> one.
--
-------------------------------------------------------------
Rodney M. Bates, retired assistant professor
Dept. of Computer Science, Wichita State University
Wichita, KS 67260-0083
316-978-3922
rodney.bates at wichita.edu
More information about the M3devel
mailing list