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
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to