Re: get_maximized





--- muppet <scott asofyet org> wrote:

[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, http://search.cpan.org/~zenin/enum-1.016/enum.pm .

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,
iirc.


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>

_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list


Well, even being 3 years late I'd like to spell out my point(s):

1) documentation on (gtk+ + friends) Perl bindings by itself is unsufficient
to practically use the bindings;

2) because of the above one has to look into gtk+ "C" documentation
- at least, I had to do this many tines;

3) whenever Perl bindings differ from the original "C" it's a confusion
for end user like myself, though I understand that Perl is not "C", so
some differences are expected, like  structs will become hashes, all numeric
types are essentially the same in Perl, etc.

I do not buy your argument about Perl programmers not knowing "C" because
I myself learned "C" long before Perl :-).

Guys, when porting next things PLEASE try not to be oversmart, OK ?

Thanks,
  Sergei.

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

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



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