Joe Pluta wrote:
raging debate between Pascal and C syntax. In Pascal, the equality
operator is one character ("=") and the assignment operator is two
(":="). As you know, in C and its derivatives, assignment is one
character ("=") and equality is two ("=="). There would be screaming
matches about this, with the C advocates actually doing statistical
analysis of code to prove that there were more assignments than
comparisons, and thus C was more productive.
Personally, I've always felt that both Niklaus Wirth and Dennis Ritchie
were full of equine scat on that one: if a language as advanced as PL/I,
and one as simple as all but the most rudimentary dialects of BASIC, can
both recognize whether "=" was being used in an assignment context or an
equality context, then why SHOULD there be separate operators, at least
for general use? Sure, in the 0.01% of cases where the context is
ambiguous, there ought to be a separate ":=" (and maybe even a separate
"==") to allow specificity, but for the other 99.99% of cases, there is
no ambiguity of context, and no need for separate equality and
assignment operators.
I demonstrated how easy it is (at least with recursive descent parsing)
to recognize the context of an "=" over two decades ago, when I took
compiler construction at the university (a graduation requirement for
all CS majors), and the assignment was to write the compiler for a
degenerate subset of Modula-2.
At any rate, as far as I'm concerned, NO ONE LANGUAGE, NOT EVEN PL/I, IS
THE RIGHT TOOL FOR EVERY SINGLE JOB.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.