On Sun, Jan 9, 2011 at 19:50, Mathieu Suen <[email protected]> wrote:
> On Jan 9, 2011, at 6:14 PM, Paolo Bonzini wrote:
>
>> No, Smaltalk objects are not automatically converted to instances from
>> the CObject hierarchy.
>
> Could it be interesting to have message like asCUChar, asCInt...?
> This could avoid writing too mush parenthesis for example:
> aCObject at: 1 put: 230 asCUChar.

I don't think this would be used very often.  Your example would not
be equivalent to

   aCObject[1] = 230;

but rather

   char *p = malloc (1);
   *p = 230;
   aCObject[1] = p;

Paolo

_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to