[Python-ideas] [Wild Idea] Static Ducks

Dj Gilcrease digitalxero at gmail.com
Sun Sep 20 10:42:15 CEST 2009

On Sun, Sep 20, 2009 at 1:34 AM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> A potential problem with this is that if you make it *too*
> easy to write type checks, you're likely to end up with
> inefficiencies due to types being checked a lot more
> often than they really need to be.

True, which is why I figured it should be off by default and need
either a command line option to be enabled globally or some form of
activation at the top of the file to be enabled for a specific module.
Doing it this way will make it so the dev needs to decide if they want
to incur the performance penalty for type safety. I figure it would be
used most often via the command line option for testing to ensure an
app or library is type safe within itself and leave it to people that
use it to make sure they are following the rules. The other common
place I see it being used is within an IDE to mark code as an error
that fails the specified type.

Since you work on Pyrex and one of the potential use cases I listed
was for python to c compilers is there anything you would change about
my specified syntax and usage to work better for Pyrex?

More information about the Python-ideas mailing list