Re: GtkType stuff

Tim Janik <> writes:

> > The grammer defined by Gtk right now is ambigous and needs
> > semantic disambiguation.  Not good.
> the semantics for object arguments (or "options") is not "ambiguous" as long
> as certain rules are taken care off:

These rules are what I meant by `semantic disambiguation', above.
> C introduces "char" as a type identifier with defined semantics. its not
> Gtk's bussiness to lift up and break with that scheme.

I do think it is.  Not completely, of course, but only where it makes
sense.  Actually, what is the meaning of `gchar' as compared to
`char'?  Is it exactly the same?  Is it used to distinguish certain
uses of `char' from others?  Like, dare I say it, using `char' for
characters from the ASCII set, as opposed to using `char' for integers
in the range 0...127?

And what's the point of `gboolean', eh?

> there's an established code base out there, using the current fundamental
> types of gtk. we don't have any good reason to break all of that.

Ok, then I want to have GTK_TYPE_CHARACTER, with the intended meaning.
For simplicity, maybe we should remove GTK_TYPE_CHAR and

> i don't get why you insist on gtk trying to "fix up" C's type names.

Not so much the names, more so the meaning.
> uhm. till now, i've always considered bytes to be unsigned by default.


> > We need to be able to distinguish between characters and numbers, even
> > for ASCII.
> we got a differentiation between those already. you are still free
> to use GTK_TYPE_INT.

Yes!  That's what I want!  Everybody should use GTK_TYPE_INT for
integers, and GTK_TYPE_CHAR for characters.

But there is no use merely *allowing* such a distinction.  We must
*require* it.

Then there is no place for GTK_TYPE_UCHAR.

This distinction needs to be in place so that languages that actually
have different types for numbers and characters. (what a concept!)

> > I'm not sure if I like the "container" in there...
> hm `container' might not be the best idea, but what i'm aming at is
> something like

It's not inherently bad, but it already has a meaning in Gtk.

> gtk_type_slist_[something] (GTK_TYPE_OBJECT) reveals e.g. 32666 for the first
> time it is invoked and does so on subsequent invokations as well, rather
> than issueing
> Gtk-WARNING **: gtk_type_slist_[something](): type `GtkObject' has already been registered.

Yes, of course.  For this kind of behaviour, `register' is indeed
inappropriate. `gtk_type_slist' is too undescriptive, on the other
hand, I think.  Maybe `gtk_type_slist_of'.  But that's probaly too

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