PEP 3107 and stronger typing (note: probably a newbie question)

Paul Boddie paul at boddie.org.uk
Wed Jun 27 09:18:25 EDT 2007


On 27 Jun, 14:02, Stephen R Laniel <s... at laniels.org> wrote:
>
> I'd like to point again to Mark-Jason Dominus's
> explanation of how strong static typing can be done well:
> http://perl.plover.com/yak/typing/notes.html

What's interesting is that the author touches on explicit attribute
declarations in slide 37 - something which I think John Nagle
suggested recently, although apologies to John and the person in
question if it was someone else. Without actually declaring types for
those attributes, it's possible to make some potential efficiency
gains, and I think that interfaces (really clusters of attributes in
this case) can be deduced with only this information explicitly stated
by the programmer. Of course, you can also try whole program analysis
to get an idea of which instances have which attributes, too.
Certainly, there are lots of approaches available without writing type
names all over the place, as seems to be the fashion in certain
circles.

Paul




More information about the Python-list mailing list