[Python-ideas] [Wild Idea] Static Ducks

Steven D'Aprano steve at pearwood.info
Sat Sep 19 11:16:42 CEST 2009

On Sat, 19 Sep 2009 06:19:25 pm Dj Gilcrease wrote:
> I do not expect this idea to gain much traction but it has been an
> idea rolling around in my head for a year or two, so I decided to
> write it all down and see what other thought.

For starters, it's not clear what a static duck is.

Is it a type? Is it a syntax? Is it an extension to existing built-in 
types? All of the above? 

When enabled, does the compiler do the type checking at compile time? 
Does it happen at runtime? Both? What sort of type checking is done? 
Pascal-style declarative type checking, or Haskell-style type 

Why "static duck"? What does this have to do with duck typing?

Rather than give an implementation of how users can create their own 
static ducks, it would be better to give some use-cases for where you 
would use them and what the behaviour is.

Steven D'Aprano

More information about the Python-ideas mailing list