Lies in education [was Re: The "loop and a half"]

bartc bc at freeuk.com
Fri Oct 13 10:27:12 EDT 2017


On 13/10/2017 14:22, Marko Rauhamaa wrote:

> BTW, the original reason for C requiring declarations in the first place
> wasn't readability. Rather, it was to make compilation possible in the
> first place. It is interesting that C++ and Java have taken steps to
> remove such information where the compiler can know or guess it from the
> context.


The compiler might be able to, after analysing 100,000 lines of prior 
code and applying complex algorithms.

But what about the poor user reading the code? Or can that now only be 
done with the aid or a browser that analyses 100,000 lines and applies 
that same algorithm?

We mustn't forget the person writing the code, who may have a certain 
type in mind for X, but their (I nearly said 'his') analysis may not 
match the compiler's.

Annotations can be useful.

-- 
bartc



More information about the Python-list mailing list