<br><br><div class="gmail_quote">On Mon, Mar 8, 2010 at 7:29 AM, Paolo Bonzini <span dir="ltr">&lt;<a href="mailto:bonzini@gnu.org">bonzini@gnu.org</a>&gt;</span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
The other more high-level feature of CObject, as far as I can see, is that it includes classes like CInt, CDouble, CString, CPtr or CArray. These embed the ABI knowledge; they support C-like pointer arithmetic (i.e. incrementing a CInt is equivalent to incrementing an int *).  Like an Alien, they can represent any of malloced/GCed/foreign storage, though the arithmetic has bounds checking only if the backing store for the CObject is garbage collected.  They are also the basic building blocks for CStruct/CUnion.<br>
</blockquote><div><br></div><div>Some of this sort of thing exists in the module CAPI in the Newspeak version.  A fair amount of convenience is available using such wrappers. We also have a Win32API module. These things only contain functionality we actually used, but they do help avoid repeating some of the boiler plate. A higher level mechanism is certainly useful.</div>
</div><br clear="all"><br>-- <br>Cheers, Gilad<br>