Message-ID: <971536df0903070846h3692e809ga195d126da37de5e@mail.gmail.com>
Date: 2009-03-07T16:46:42Z
From: Gabor Grothendieck
Subject: question
In-Reply-To: <49B2A2E1.20508@idi.ntnu.no>
On Sat, Mar 7, 2009 at 11:37 AM, Wacek Kusnierczyk
<Waclaw.Marcin.Kusnierczyk at idi.ntnu.no> wrote:
> Gabor Grothendieck wrote:
>>
>>> as gabor says in another post, you probably should first show why having
>>> multiple value returns would be useful in r. ?however, i don't think
>>> there are good counterarguments anyway, and putting on you the burden of
>>> proving a relatively obvious (or not so?) thing is a weak escape.
>>>
>>> to call for a reference, sec. 9.2.3, p. 450+ in [1] provides some
>>> discussion and examples.
>>>
>>>
>>
>> The fact that other languages is an argument for further consideration
>> but not a definitive argument for it.
>>
>
> of course!
>
>> I have had this feature for years via my workaround yet I never
>> use it which seems a good argument against it.
>>
>
> the fact that another programmer is an argument for further
> consideration but not a definitive argument against it.
I've provided an argument against it and no one has provided one
for it. The so-called identical code Ivo showed was not identical
and, in fact, was flawed. Your first/last example could be
written:
f <- function() letters
L <- structure(f()[1:2], names = c("first", "last"))
or one could define a function to do that without having
to modify the language. Given the relative infrequency
of this it hardly seems to merit a language feature.