Re: [RFC] Glib::filename_(to|from)_unicode => Glib->filename_(to|from)_unicode?



On Thu, Jan 08, 2004 at 08:25:15AM -0500, Ross McFarland <rwmcfa1 neces com> wrote:
All other class static methods in Gtk2-Perl are called with the arrow syntax.
  ^^^^^^^^^^^^^

The whole point is that these are no static methods, but functions.

to be callable in the same way for uniformity sake. if people are used to the
-> everywhere else then they'll try to here.

People are not used to -> in most other places, modules, perl builtins
etc.

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.

You are comparing apples to oranges. Your example gtk_button_set_label is
a method (both in C and perl), the functions we are discussing here are
functions both in C and perl.

inheritance is the advantage, althought with this particular function that may
be a stretch, but we can't decide that for people now

Sure we can, there is no inheritence involved here at all. That's the
reason they are functions. Forcing useless inheritance is bad for users,
IMHO.

inheritance reasons, if you don't then you take away people's ability to do

There is no and will never be a valid reason to inherit from Glib, because
Glib is not a class. Inheritance as a design tool makes sense only with
classes or objects, not with random bundles of functionality that have no
object to work on.

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.

It's quite impossible, since this is new functionality implemented by me
very recently. I was on vacation, and had no idea this was being
changed.

However, the decision I was told of was to stay to the C API so people
have least problems when switching to perl, i.e. no extensions.

Also, other areas where functions have been used (e.g. for the PANGO_*
constants) have been reverted because it makes plain no sense to force
things that simply are no methods (functions and constants) to be some.

So if there was a decision to make everything methods (that I do not know
of), then it's already broken by the existing implementation, and for very
good reasons.

What decision are you refering to, then, and why was it or was not
adhered to earlier, either?

-- 
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       pcg goof com      |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |



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