Re: get_maximized

[please do take the time to trim the context on your replies.]

Sergei Steshenko wrote:
--- muppet <scott asofyet org> wrote:
The API was designed this way to allow you to use C-ish syntax if
that's what you're used to, or more meaningful syntax if you prefer.
The implementations of the operators have the necessary magic to
ensure that you get what you mean with various ways to ask for it.

Why was this done in the first place ?
Why not to leave it the original "C" way using 'enum' ?

I mean, .

Because C-style bitfields make sense to C programmers, but not to many perl
programmers who've never learned C.

On a technical note, using constant values a la the enum module was
impractical because we make use of glib / gobject / gtk+'s built-in lists of
enum to name mappings, which is where we get these string nicknames.  Without
that we would've had to maintain lists of enumeration values by hand, meaning
they'd always be wrong.  This practice was adopted by Gtk-Perl in about 1998,

I disagree with the claim that present implemetation leaves
things like they are in gtk+ "C" - I believe it's the opposite.

Note that i said it allows you to use a "C-ish" syntax, not same as in C.

At any rate, you're just shy of three years too late (the overloads were
created in November of '03 by Marc Lehmann), and the current state of things
is part of an API-frozen stable release series and will not go away.

muppet <scott at asofyet dot org>

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