On 11/20/02 Miguel de Icaza wrote:
> > It's better to make the script generate properties:
> > 
> >     public static int O_EXCL {
> >             get {return 0xwhatever;}
> >     }
> 
> The problem with this is that you need to compile the Mono.Posix
> assembly once for each operating system where it will be used.  It will
> certainly work, but we will have different assemblies.
> 
> If we are going that way, there is no reason for using this, we might as
> well, just use a const:
> 
>       public const int O_EXCL = 0xwhatever;
> 
> Which the compiler can constant fold, so its even better ;-)

No, this is wrong, it will make the programs compiled against such an
assembly platform-dependent. Using properties does not.

> I still think that the model I proposed is best, as we dont need a
> per-OS assembly to be compiled.

But you need a per-OS shared library and the code will be slower at
runtime. So, the two choices are:

1) per-OS assembly
        * faster
        * smaller
        * easier to deploy
2) OS-indep assembly + OS-dependent shared library
        * slower
        * bigger
        * one more thing to deploy

The choice looks like a no brainer to me:-)

lupus

-- 
-----------------------------------------------------------------
[EMAIL PROTECTED]                                     debian/rules
[EMAIL PROTECTED]                             Monkeys do it better

_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to