From maechler at stat.math.ethz.ch  Fri Apr  3 15:20:25 2009
From: maechler at stat.math.ethz.ch (maechler at stat.math.ethz.ch)
Date: Fri,  3 Apr 2009 15:20:25 +0200 (CEST)
Subject: [Rd] actual argument matching does not conform to the
	definition (PR#13634)
Message-ID: <20090403132025.194EE2834318@mail.pubhealth.ku.dk>

>>>>> "vQ" == Wacek Kusnierczyk <Waclaw.Marcin.Kusnierczyk at idi.ntnu.no>
>>>>>     on Thu, 02 Apr 2009 15:25:14 +0200 writes:

    vQ> Thomas Lumley wrote:
    >> 
    >> The explanation is that quote() is a primitive function and that the
    >> argument matching rules do not apply to primitives.  That section of
    >> the R Language definition should say that primitives are excluded;  it
    >> is documented in ?.Primitive.

    vQ> thanks.  indeed, the documentation --  the language *definition* --
    vQ> should make this clear.  so this is a bug in the definition, which does
    vQ> not match the implementation, which in turn is as intended (right?)

    vQ> ?.Primitive says:

    vQ> "     The advantage of '.Primitive' over '.Internal' functions is the
    vQ> potential efficiency of argument passing.  However, this is done
    vQ> by ignoring argument names and using positional matching of
    vQ> arguments (unless arranged differently for specific primitives
    vQ> such as 'rep'), so this is discouraged for functions of more than
    vQ> one argument.
    vQ> "

    vQ> what is discouraged?

Well...  
Wacek, as seem to you want it, and it being Friday afternoon... 
here comes .... 
a biased view of one R hobby historian :

Even though R was created originally in New Zealand and then
heavily picked up in Europe slightly before (North) America,
the development model of R, in my eyes, has been closer to
sentiments of people from the land of the free and home of the
brave, rather than European censorship and dictatorship
{being a full-hearted European, I hope I'm allowed the slight
 exaggeration ;-)}.

Consequently, there has always been quite a bit of freedom in R
development within the R core development team...
and yes, R is not the result of comittee design-process,
but yes, it's good we have members in the core team (and the
wider R developer base) who have called us to make decisions and
try to stand by them .. ;-) :-)

The frequent vs minimal use of .Primitives has been one of the
areas where some R-core members have tried to discourage other
R-core members from "doing too much" ..

Fact is that using *more* .Primitives rather than less during
the last few years has allowed to make  S3 and S4 method
dispatch slightly more uniform and still efficient.
In the long term, ideally we'd diminuish the number of
.Primitives substantially, exactly for reasons some of which you
mention in this thread.

Martin



[Rd] actual argument matching does not conform to the definition (PR#13634)
maechler at stat.math.ethz.ch