[Mono-devel-list] [PATCH] GetFolderPath improvements

Ben Maurer bmaurer at ximian.com
Tue Jun 15 20:56:24 EDT 2004


On Tue, 2004-06-15 at 20:14, Todd Berman wrote:
> So we are moving a chunk of code from corlib to the runtime to prevent a 
>   switch in a method that is not used more than once or twice if even at 
> all in an average program's lifecycle?

Removing the switch was not the point of this patch.

My point was that there is alot of data about the system that we gain
from autoconf, and from the ability to call system apis (such as
g_get_home_dir)
     A. must pass to corlib via some internal api (requires adding an
        icall or
     B. deal with in unmanaged code

Both methods require an icall. But method B keeps all the code in one
place whereas method A requires syncing between corlib and the runtime. 

Doing this in unmanaged code leaves a nice clean interface.

Also, note that there are very few places in which we test for Unix
right now. The only places where I can see this sort of test are in
Console and System.Security.Principal. OTOH, there are tons of tests
like this in metadata.

-- Ben




More information about the Mono-devel-list mailing list