Yes, that is a solution I offered when we (me and Elan) tried to
implement the method calling for objects.
He didn't like it and objected, that you have to supply a block
even in the case, when you do not want to supply any argument.
Instead he proposed the use of Do function, which provoked my
thoughts about the "human rights" of the functions, because we can
divide Rebol functions to two classes:
1) Do
2) any other function
You can easily find out, that even though:
>> first :do
== [value /args arg /next]
tries to convince us, that it normally takes only one argument, in
the following case it may be accused of taking five:
>> do func [a1 a2 a3 a4] [probe a1 probe a2 probe a3 probe a4] 1 2
3 4
1
2
3
4
== 4
To make sure, that Do is really privileged, try to write a Rebol
function to mimic the Do behaviour in the same way as the
following function mimics the type? behaviour:
fntype?: func [value] [type? :value]
I am pretty sure that you cannot succeed. Moreover, Rebol tech. by
including Do to the Core signaled, that the functions with
unlimited arguments are necessary.
Opinions?
Ladislav
> Ladislav wrote:
> > Did you think about the following question: Is there a need to
have
> the functions with unlimited number of arguments in Rebol?
>
> This works well for me:
>
> >> Unlimited_Arguments: func [Arguments [block!]] [print
Arguments]
> >> Unlimited_Arguments ['Arg1 'Arg2 'Arg3 'Arg4]
> Arg1 Arg2 Arg3 Arg4
>
> Andrew Martin
> [EMAIL PROTECTED]
> http://members.xoom.com/AndrewMartin/
> Online @ 33,600 Baud!
> -><-
>
>
>