Re: Standalone Pango




On Jun 30, 2008, at 5:32 PM, Sergei Steshenko wrote:



Applications From Scratch: http://appsfromscratch.berlios.de/


--- On Sun, 6/29/08, muppet <scott asofyet org> wrote:

From: muppet <scott asofyet org>
Subject: Re: Standalone Pango
To: "gtk2-perl List" <gtk-perl-list gnome org>
Date: Sunday, June 29, 2008, 10:36 AM
On Jun 29, 2008, at 10:20 AM, Torsten Schoenfeld wrote:



        /* i love nasty ugly hacks for backwards compat...
Glib::UInt used
         * to be misspelled as Glib::Uint.  by registering both
names to the
         * same gtype, we get the mappings for two packages to one
gtype, but
         * only one mapping (the last and correct one) from type
to package.
         */
        G_LOCK (types_by_package);
        g_hash_table_insert (types_by_package,
"Glib::Uint",
                             (gpointer) G_TYPE_UINT);
        G_UNLOCK (types_by_package);

(Please note the sarcasm in the comment.)

Is GNOME/gtk+/gtk-perl all like that ?

No. There are a handful of edge cases. BUT, one of the main reasons that there is noise about an API/ABI break for gtk+ 3.x is that it is getting harder to maintain the 2.x-series compatibility promise but still fix bugs and add new features.


I mean, is it the accepted practice to write ugly backward compatibility
hacks instead of fixing the root cause ?


I think you're missing the point. We *did* fix the root cause --- we changed the spelling of the type name. The purpose of the hack was to maintain backwards compatibility with programs that had already been written against stable releases. We don't document or advertise that you can misspell the name, because it's not right; but we accept that input because we did in early stable releases and don't want to break people's otherwise working code.

You'll find this sort of thing in any software that makes any reasonable attempt not to break users' code.

To wit, there is gtk2-perl code that i wrote and distributed in 2003 that is still in production, unchanged, working fine as system upgrades come and go. Users place high value on that sort of stability.


--
The stereo, playing the Beastie Boys' "Rhymin' and Stealin'": "I'll steal your girlie like I stole your bike!"

Elysse:  "You mean, take off the chain and ride away?"





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