[Mono-osx] MacOS bindings and MonoDevelop.
Евгений Гришуль
eugeny.grishul at gmail.com
Tue May 12 20:17:24 EDT 2009
>This is not accurate, since your approach box the valuetypes, they impose
the same overhead as reference types. The MS runtime supports this by
accident, as this is not something defined my >the ECMA standard and is type
unsound.
Do you really think that MS supports this by accident about 8 years? You are
joking =)
Using mine approach boxing of Objective-C proxies appears only in places
like "string.Format", but MOST of program work with structs or their copies.
Where there box operations:
Assert.AreEqual( 0x6FFF7FFF, new NSNumber( NSNumber.numberWithInt_(
0x6FFF7FFF ) ).intValue() );
Assert.AreEqual( 0x6FFF7FFF, new NSNumber( NSNumber.numberWithLong_(
0x6FFF7FFF ) ).longValue() );
Assert.AreEqual( 0x7FFF6FFFu, new NSNumber(
NSNumber.numberWithUnsignedInt_( 0x7FFF6FFFu ) ).unsignedIntValue() );
>I see. Well, like our JIT engineer Rodrigo Kumpera said, this is a
>feature that we do not plan on supporting and that we reserve the right
>to break (see the discussion on this list from February).
Having such feature makes more sense than performance gained from SIMD
optimizations for Mac OS GUI programming ;)
See main page http://code.google.com/p/nobjective/ for managed/unmanaged
memory consumption test result.
>The problem is that it should support this:
> class Foo : Control {
> public override bool Enable {
> get { ... };
> set { ... };
> }
> }
>Which is not possible to do with NObjective.
Do you mean overrides for imported to .NET runtime Objective-C classes or
exported to Objective-C .NET classes? For exported classes programmer should
know such fundamental things of Objective-C like that all methods are
virtual (like in Java). He can write following to 'override' exported
Objective-C methods:
class Foo : Control {
public new bool Enable {
get { ... };
set { ... };
}
}
'virtual' specifier makes sense only for C# code that uses such methods, but
makes no sense while exporting. Also I can write additional code that will
throw exception forALL 'virtual' methods that user want to export to prevent
such misunderstanding.
--
WBR,
Eugeny Grishul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20090513/502692d5/attachment.html
More information about the Mono-osx
mailing list