Strong typing implementation for Python

Josef Pktd josef.pktd at gmail.com
Tue Oct 13 19:25:31 EDT 2015


On Tuesday, October 13, 2015 at 2:52:32 PM UTC-4, Sibylle Koczian wrote:
> Am 13.10.2015 um 00:10 schrieb Ben Finney:
> > Sibylle Koczian <> writes:
> >
> >> Am 12.10.2015 um 13:39 schrieb Steven D'Aprano:
> >>> Auto-complete is a fine and useful tool. But if you are crippled as a
> >>> programmer without it, well, then you can hardly claim to understand the
> >>> language or framework you are programming in if you cannot use it without
> >>> an IDE doing half the work for you.
> >>>
> >>
> >> Well ... you're certainly quite right as far as Python and its
> >> standard library is concerned. But I don't know who would really want
> >> to use .NET without auto-complete and for all I know Java may be just
> >> as awful.
> >
> > Yes, and that is quite compatible with Steven's assertion. The two
> > assertions:
> >
> > * A programmer who feels crippled without auto-complete cannot claim to
> >    understand the language or framework they're programming in.
> >    (assertion made by Steven)
> >
> > * The overwhelming majority of .NET and Java programmers would feel
> >    crippled without auto-complete. (assertion made by Sibylle)
> >
> Not really wanting to do without x isn't the same as feeling crippled 
> without it.

To support this

I have been writing numpy/scipy based code in python for many years, and still I make a lot more mistakes without autocompletion and having pyflakes or similar run in the editor in the background.

I know roughly where everything is in a large class hierarchy with more information hidden in attached classes (instances). But it's easy to figure out the details with code completion and standard inspection.
It works pretty well maybe 90 % of the time (except in chained expressions).
I also memorize only the main arguments in the signatures, and rely for the rest on the pop-up hints.

> 
> > can both be true. An obvious resolution is to conclude that the
> > overwhelming majority of Java and .NET programmers cannot claim to
> > understand those technologies.
> >
> I don't think you can measure understanding by the ability and 
> willingness (!) to type those overlong and yet similar names again and 
> again in full.
> 
> > Python, on the other hand, has the huge advantage that programming in
> > even a bare minimal editor is feasible, and editor features that make
> > the programmer's life easier are conveniences, not essential to be
> > competent in Python.
> >
> Only one of its huge advantages. As long as no GUI is necessary ... but 
> that's another story.

I don't know about GUI programming, but even though it's not part of the language there are packages for example for asserting and maintaining types and restriction on values like traits and traitlets.

Josef


> 
> Sibylle




More information about the Python-list mailing list