From Waclaw.Marcin.Kusnierczyk at idi.ntnu.no  Sat Mar  7 16:26:43 2009
From: Waclaw.Marcin.Kusnierczyk at idi.ntnu.no (Wacek Kusnierczyk)
Date: Sat, 07 Mar 2009 16:26:43 +0100
Subject: [Rd] question
In-Reply-To: <000325575fc2f3201e046488263f@google.com>
References: <000325575fc2f3201e046488263f@google.com>
Message-ID: <49B29233.7040205@idi.ntnu.no>

ivowel at gmail.com wrote:
> Gentlemen---these are all very clever workarounds, 

hacks around the lack of a feature

> but please forgive me for voicing my own opinion: IMHO, returning
> multiple values in a statistical language should really be part of the
> language itself. 

returning multiple values is supported by many programming languages, in
particular scripting languages.  while in r you can use the %<-% hack or
have functions return lists of values, it  could indeed be useful to
have such a feature in a statistical language like r.


> there should be a standard syntax of some sort, 

if you mean that r should have such a syntax, you're likely to learn
more about saying 'should' soon. 

> whatever it may be, that everyone should be able to use and which
> easily transfers from one local computer to another. It should not
> rely on clever hacks in the .Rprofile that are different from user to
> user, and which leave a reader of end user R code baffled at first by
> all the magic that is going on. Even the R tutorials for beginners
> should show a multiple-value return example right at the point where
> function calls and return values are first explained.

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.

vQ

[1] Design Concepts in Programming Languages, Turbak and Gifford with
Sheldon, MIT 2008



[Rd] question
Wacek Kusnierczyk