New in C#4

bearophile bearophileHUGS at lycos.com
Wed Oct 29 14:03:54 PDT 2008


Denis Koroskin:
>"unlike Python" is related to omitting parameters. Python allows that but it doesn't really fit statically typed langugages, I believe.<

I don't understand what you mean, in Python if you omit necessary arguments you receive an error:

def foo(x, y=5): print x,y
foo(10, 20) # Output: 10 20
foo(10) # Output: 10 5
foo() # TypeError: foo() takes at least 1 argument (0 given)

Bye,
bearophile



More information about the Digitalmars-d mailing list