Wondering whether it would be a good idea to introduce a syntactic device
to distinguish between default arguments & other uses of initialized
locals. E.g., John started his example with a no-argument "f", and now
has a one-argument f. Perhaps
"def" name "(" argument-list [";" initialized-local-list] "):"
? Say, going _way_ back,
def make_incrementer(inc): # return a function that increments by "inc"
def f(x; n=inc):
by3 = make_incrementer(3)
by3() # wrong number of arguments
by3(12) # returns 15
by3(12,-12) # wrong number of arguments, instead of 0
In its favor, it lets you say what you mean more often. Don't know how
much pain it would be, though.
will-live-either-way-ly y'rs - tim