Assignment Versus Equality
Steven D'Aprano
steve at pearwood.info
Mon Jun 27 21:34:59 EDT 2016
On Mon, 27 Jun 2016 11:59 pm, Grant Edwards wrote:
> On 2016-06-26, BartC <bc at freeuk.com> wrote:
>
>> (Note, for those who don't know (old) Fortran, that spaces and tabs are
>> not significant. So those dots are needed, otherwise "a eq b" would be
>> parsed as "aeqb".)
>
> I've always been baffled by that.
>
> Were there other languages that did something similar?
>
> Why would a language designer think it a good idea?
>
> Did the poor sod who wrote the compiler think it was a good idea?
I don't know if it was a deliberate design decision or not, but I don't
believe that it survived very many releases of the Fortran standard.
Remember that Fortran was THE first high-level language. Its creator, John
Backus, was breaking new ground and doing things that had never been done
before[1], so the things that we take for granted about high-level
programming languages were still being invented. If early Fortran got a few
things wrong, we shouldn't be surprised.
Also the earliest Fortran code was not expected to be typed into a computer.
It was expected to be entered via punched cards, which eliminates the need
for spaces.
[1] Almost. He has previously created a high-level assembly language,
Speedcoding, for IBM, which can be considered the predecessor of Fortran.
--
Steven
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.
More information about the Python-list
mailing list