Re: broken oop ? (example)



>I think you are completely missing the point.

maybe... but show me

>Yes, you may not be able to transform a GTK+ structure into a pointer
>to a Pasal record. (Does Pascal have pointers? 

yep.

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.

  C                  Pascal

char *a;             a: PChar;

very easy,
you are socked now !?      :)

>And if we did manage to achieve that mapping feat for Pascal, what
>would happen with the next language that comes along?

the next languaje could be easily support generic data types,
(even without letting that to the user ) i.e. pointers, integers,
bytes, words, etc.
But bit packing is really weird, IMO.

Overall, when I think it could be solved by an enum type,
so can you say me what is wrong with:

typedef enum { 0, 1} gbit;
or
typedef enum { FALSE, TRUE} gbit;

please ??

>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.

that would be very good, but rigth now, there are many, many 
widgets that lacks accesors.

> Even if GTK+ doesn't provide the accessors, you can
>certainly add them in the mapping.

by hand ? No, please  :(

Sergio



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