New in C#4

bearophile bearophileHUGS at lycos.com
Wed Oct 29 12:50:40 PDT 2008


Jarrett Billingsley:
> Since it's getting resolved at compile time, no bitfield is necessary.

When we have designed ShedSkin we have had to deal with named arguments too, including situations like:

import sys
def foo(a, b): return a - b
def bar(b, a): return a / b
fun = [foo, bar]
if sys.argv[1] == "1":
    fun[0], fun[1] = fun[1], fun[0]
print fun[0](a=5.0, b=3.0)

The relative input/output:
C:\>args.py 0
2.0
C:\>args.py 1
1.66666666667

Bye,
bearophile



More information about the Digitalmars-d mailing list