|
|
Darren New escreveu:
> Mike Raiford wrote:
>> That is how C# is now. Sometimes it would be nice just to have one
>> function with defaults, rather than 3 overloads of the same function
>> that simply delegate back to the "full featured" function.
>
> No, i mean instead of
> job.print(orient:landscape, copies:2, paper:A4)
> the suggestion it that it's much more OO to say
> job.initialize()
> job.orient(landscape)
> job.copies(2)
> job.paper(A4)
> job.print()
More OO, or more assemblyish? I mean, you individually feed the stack
and then call a function using those arguments already in the stack. ;)
seems we're going full cycle here... :P
Of course, assembly (and function currying in Haskell for that matter)
expect arguments in the right order. Named arguments and the above more
OO and barroque way do not.
Post a reply to this message
|
|