World: r3wp
[!REBOL3 Proposals] For discussion of feature proposals
older | first |
Marco 17-Mar-2011 [1003] | in the foo function /something is a refinement and not an _optional_ refinement. In your my-sum function amount is not a refinment and my-sum 1 2 none == 3 is correct. What I am saying is that the extra none! adds polymorphism (but i have not investigated that too much so i could be mistaken), so you can write: sum 1 2 or sum 1 2 3 or sum 1 2 none without checking for none before calling the function. |
Kaj 17-Mar-2011 [1004x2] | Ehm, the nature of refinements is that they're optional |
And you can't write SUM 1 2 without a refinement if you have an extra AMOUNT parameter. The number of parameters is fixed in REBOL. The way to have optional parameters is to use refinements (or a BLOCK! argument) | |
Gregg 17-Mar-2011 [1006:last] | I don't see the benefit to the propsal at this point. |
older | first |