Re: [RFC] Glib::filename_(to|from)_unicode => Glib->filename_(to|from)_unicode?
- From: "Ross McFarland" <rwmcfa1 neces com>
- To: gtk-perl-list gnome org
- Subject: Re: [RFC] Glib::filename_(to|from)_unicode => Glib->filename_(to|from)_unicode?
- Date: Thu, 8 Jan 2004 08:25:15 -0500 (EST)
Marc Lehmann said:
On Wed, Jan 07, 2004 at 07:39:23PM -0800, "Robert G. Werner"
<robert inreachtech net> wrote:
I'm not sure what you are trying to do here. Your whole argument
seems to be that since gtk+ was implemented in a language that doesn't
have object oriented syntactic sugar,
Then you didn't understand my argument, possibly I wasn't clear enough
in representing it, so let me try to clarify these points.
First of all, I do not care about syntactic sugar (here). I do care about
semantics, ease-of-use and expectencies.
to be honest i'm not sure who's arguing for what at this point. so i'll make
my points and get out.
All other class static methods in Gtk2-Perl are called with the arrow syntax.
Gtk2::Button->new, Glib::Idle->add, etc. etc. this one at the very least needs
to be callable in the same way for uniformity sake. if people are used to the
-> everywhere else then they'll try to here.
While C has not much in the way of syntactic sugar, it clearly does have
methods and functions, at least in glib and gtk+. This fact is well
documented.
Perl shouldn't use the syntax it has to make the API more perlish.
To the contrary, perl _should_ use the syntax it has to make the API
more perlish.
very much so. if not then everything would be called like
gtk_button_set_label ($button, 'label');
that is c's way of being object oriented, not perl's.
The point here is that perl _does_ have functions, and functions are the
most common thing being used to represent functions, and to implement
the functionality implemented by the functions mentioned in the
subjects.
This, making these methods is not making the API more perlish, instead,
it's both making the API less perlish (being methods, which is very
uncommon, look at perl's builtin or the Encode module, for example), and
it's also making the API less similar to the C api, which alos doesn't use
methods here but functions.
Thus forcing them to be methods gives no advantage (at leats nobody ever
mentioned an advantage yet), but a lot of disadvantages, some of which
are very small (speed) some of which are large (inconsistent with both
documentation and existing practise in perl).
inheritance is the advantage, althought with this particular function that may
be a stretch, but we can't decide that for people now, maybe someone will come
up with a good reason to inherit from such things, we should allow it. the
book 'Perl Objects, References & Modules' OReilly, Randal L. Schwartz, ISBN:
0-596-00478-8. takes up the issue and ends up saying to use the arrow for
inheritance reasons, if you don't then you take away people's ability to do
so. (sorry i don't off hand remember where it was said and i don't have time
to skim back over and find it.)
think you are a troll. And a pretty useless one at that.
... at least I do contribute! Do you?
put on white gloves, and then someone take one off, smack the other and demand
satisfaction. back-to-back, 12 paces turn around and shoot.
quite frankly the decision was made way back when. we can discuss it now, but
the result was probably decided upon the inception of gtk2-perl-xs.
-rm
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]