From simon.urbanek at r-project.org  Wed May  2 03:13:18 2007
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Tue, 1 May 2007 21:13:18 -0400
Subject: [Rd] Embedding R and registering routines
In-Reply-To: <m2slaggq7k.fsf@ziti.local>
References: <46375AC9.5000201@vanderbilt.edu>
	<20070501175605.GS30532@wald.ucdavis.edu>
	<B564A90A-FF27-4BEA-B0BC-D60853F71782@r-project.org>
	<20070501202445.GA1806@wald.ucdavis.edu>
	<5596EE23-E8F8-440C-BAD8-129C48352ACD@r-project.org>
	<m2slaggq7k.fsf@ziti.local>
Message-ID: <08DC0118-78EB-454A-96C8-F128D1DF7ACA@r-project.org>

Seth,

On May 1, 2007, at 5:59 PM, Seth Falcon wrote:

> Simon Urbanek <simon.urbanek at r-project.org> writes:
>
>> Duncan,
>>
>> are you going to take care of this? I have a quick solution for R- 
>> devel that adds a special entry if requested.
>>
>> I'm not quite convinced that we need as much flexibility as adding  
>> arbitrary DllInfos, because the embedding application is a really  
>> special concept (everything else is dynamically loaded except for  
>> the application). In a sense "base" does that for non-embedded R  
>> and the distinction is that it doesn't allow dynamic lookup. I  
>> don't think adding arbitrary DllInfos is wise, because we would  
>> have to expose DLL handles etc. - do we really want to do that?  
>> And as for adding NULL-handle DLLInfos, there is only one  
>> legitimate use and that is the embedding application, so anything  
>> else looks more like abuse to me... (just lazy solution to not  
>> have to determine the dll). Also the embedded DllInfo cannot be  
>> unloaded by design, so it doesn't need anything complicated...
>
> Perhaps I'm not understanding the issues at hand, but I think there  
> are other use cases for a mechanism accessible to package  
> developers to dynamically register routines.  Just as R can load  
> packages to make new routines available, I don't see why an R  
> package should not be able to provide an analogous plugin mechanism  
> of its own.
>

That is a different issue - packages are free to register any  
routines as they already have a DllInfo entry in the current  
implementation. What we are talking about here is the embedded case  
where the embedding application doesn't have a DllInfo because it's  
loading R and not vice versa, so it cannot register anything.

Cheers,
Simon



[Rd] Embedding R and registering routines
Simon Urbanek