Re: [gtk-list] Re: A type system for high-level interfaces



Marius Vollmer <mvo@zagadka.ping.de> writes:

> Maurizio Vitale <Maurizio.Vitale@esat.kuleuven.ac.be> writes:
> > 
> > > > Making those symbols part of a gtk module (or prefixed by gtk:) would
> > > > help alleviating the name pollution problem.
> > > 
> > > Gtk already has to keep the namespace clean, so that wouldn't be a
> > > problem in Scheme, I think.
> > 
> > What I meant was that if you've somewhere something to the effect of
> > (define toplevel GTK_TOPLEVEL) then the user cannot bind anything else 
> > to toplevel, while if you seize all identifiers starting with gtk: for 
> > your interface you've much less problems.
> 
> The enumeration values would have their usual Gtk names, I think.
> Like GTK_WINDOW_TOPLEVEL, GTK_WINDOW_DIALOG.  So we would have code
> to effect of
> 
>     (define GTK_WINDOW_TOPLEVEL 0)
>     (define GTK_WINDOW_DIALOG 1)
> 
> Or maybe with dashes in place of the underscores.

and maybe we could lowercase them, mangle a bit and get
(define gtk:window-toplevel 0) :-).

Seriously, what is the preferred way for declaring identifiers in
C/C++ is not necessarly the best way in scheme/LISP.
On the other hand, by using the same names you can reuse gtk
documentation 'as is' [even if STk shows that this kind of 1 to 1
mappings are not a big deal].

I've no strong objections to GTK_WINDOW_TOPLEVEL (although I'd prefer
the other style _in_ scheme), as long as there's an unique prefix [I
think your original proposal had a plain 'toplevel].

	Maurizio



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