[Types-sig] check.py (was: PyDL RFC 0.02)

Martijn Faassen m.faassen@vet.uu.nl
Wed, 05 Jan 2000 11:02:33 +0100

Skip Montanaro wrote:
>     Martijn> def foo(a the Integer, b the String, c the Foo, d the Any) the Integer:
>     Martijn>     e = d the Integer
>     Martijn>     return e
>     Martijn> I could definitely live with that one. Doesn't have the
>     Martijn> semantic confusion that 'as' have and it seems readable.
> I have to toss out the barb that when the most frequently used token in my
> Python code is "the" or "as" it will be time to find another language...


> (Someone please reassure me by stating emphatically that all this extra
> stuff will never be required!)

Type-checking is optional, so all the 'as', '!', ':', 'the' or whatever
it'll be will never be required.

I just thought 'the' looked better than the ':' approach (but I may
change my mind tomorrow):

def foo(a: Integer, b: String, c: Foo, d: Any)->Integer:
    e = d ! Integer
    return e

Yeah, I may change my mind tomorrow. I just thought 'the' was cute. :)