This is the mail archive of the
guile-gtk@sources.redhat.com
mailing list for the Guile project.
Re: Making gdk-event-area work
Mark Seaborn <mseaborn@argonet.co.uk> writes:
> Pairs are usually used to represent lists, and a lot of static type
> systems only let you store lists in the cdr of a pair.
If that a static type system is intended to be used with Scheme, then
it is fundamentally broken. Pairs are used in a non-list manner all
the time, for association lists, for binary trees, etc.
> It's true there are times when improper lists are useful, but I
> don't like being gratuitously incompatible with other type systems.
> I might want my Scheme code to interoperate with them later.
I think this fear is unfounded. There is no way that such a type
system could be used extensively with Scheme.
> It's also not very readable using `car', `cdr', etc. for this. I
> suggest providing some accessor functions, `bbox-min-x',
> `bbox-min-y', etc., and saying the representation might change in a
> later version.
Yes, that's a good point. We might want to change to using Goops, for
example, and have proper types for 2D-points and stuff. What about
names like
gdk-point-x car
gdk-point-y cdr
gdk-rect-pos car
gdk-rect-size cdr
gdk-rect-x caar
gdk-rect-y cdar
gdk-rect-w cadr
gdk-rect-h cddr