Re: broken oop ? (example)




"Sergio A. Kessler" <ser@perio.unlp.edu.ar> writes:

> Look, I'm in a team where the compilers _writers_ are in,
> we are all working in a project involving gtk, when a field like
> that is found we have to put a flag of type word and make bit 
> shifts here and there to know the value of the field.
> The compilers writers say that there are no other way, because
> the stored in x bits is not implemented.
> Now, if you know something that I or the compilers writers
> don't, please, tell me.

I think you are completely missing the point.

Yes, you may not be able to transform a GTK+ structure into a pointer
to a Pasal record. (Does Pascal have pointers? Should we avoid char *
because that's not how strings are represented in Pascal?) I would
have been shocked if you could, and as far as I know, no other
language binding attempts such a thing.
 
And if we did manage to achieve that mapping feat for Pascal, what
would happen with the next language that comes along?

What I would expect, is that in general, a GTK+ structure, (especially
a widget structure) would map into an opaque data type with accessor
functions. Even if GTK+ doesn't provide the accessors, you can
certainly add them in the mapping.

Regards,
                                        Owen






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]