Hi, On Mon, Nov 18, 2002 at 01:08:02PM -0500, H. S. Teoh wrote: > Hmm, I looked at the source code, and it seems that one of the arguments > being compared is a gchar (probably a char defined by GTK libs). Smurf > itself doesn't specify whether the variable is signed or not. Anybody > knows how gchar is supposed to behave? Should it be signed or unsigned? <rant> When I see stuff like that, I can't help but wonder why the h*ll a GUI library needs to mess around with the basic C types. I cannot think of one single valid reason for GTK+ to invent another gchar, gint, glong that leave people wondering what it /actually/ is. C types are perfectly well defined. No need for 'compatibility' nonsense just because people are to lazy to stop and think what those types actually are or to look them up in a decent C manual. If gtk needs unsigned chars, then declare unsigned chars in prototypes and structs. If it always needs them signed, declare them as such. But don't do that gchar nonsense. Yuck. Code like myvartype myvar; myothervartype myothervar; mynextvartype mynextvar; makes me shudder with disgust. It achieves nothing other than moving the actual declarations somewhere else, so that you have to look at two places if you want to know what's being declared. Bah. GUI toolkits should stick to providing GUIs. Not provide a wrapper around libc, ANSI C or the whole bloody OS. Do one thing, and do it well, and try to be modest. The library serves the application, not the other way around. Oh, don't worry, nobody's going to run GNOME on windows, no matter how cross-platform it gets. Leave cross-platform problems to the applications that need them; they will find a good, application-specific way to abstract between Windows and Unix, probably at a higher layer. But don't pollute each and every GUI toolkit with that sh*te. After all, most GTK apps are already dependent on Unix in other ways. The ones that aren't, such as Mozilla and OpenOffice, already reimplement a complete OS, GUI toolkit and windowing system on their own. Before we know we need gopenfile, greadstream, gwaitforeventonfd. By then, we'll have achieved what even Bill Gates couldn't do in his wildest dreams - kill Unix's powerful, elegant and simple programming model. Bah. </rant> Emile. -- E-Advies / Emile van Bergen | emile@e-advies.info tel. +31 (0)70 3906153 | http://www.e-advies.info
Attachment:
pgpcw_0uJWBBw.pgp
Description: PGP signature