Re: [RFC] Glib::filename_(to|from)_unicode => Glib->filename_(to|from)_unicode?
- From: muppet <scott asofyet org>
- To: gtk-perl list <gtk-perl-list gnome org>
- Subject: Re: [RFC] Glib::filename_(to|from)_unicode => Glib->filename_(to|from)_unicode?
- Date: Wed, 24 Dec 2003 12:29:47 -0500
On Wednesday, December 24, 2003, at 10:05 AM, Ross McFarland wrote:
A. Pagaltzis said:
FWIW, I really hate the latter syntax used in cases where the
former would do. At the same time, that syntax forces Perl to do
more work to find the function to call and pass the class name to
the function. The only benefit of the arrow syntax is being able
to use inheritance, but is that really a concern here?
philosophically, the benefit of supporting inheritance everywhere is
that you leave no spot where a calling layer *cannot* override
something; i am not prescient enough to know ahead of time where some
guy will find a need override filename_from_unicode to register all
filenames that get converted, or add a croaking check to ensure that
the drive is mounted, etc, etc.
I'd make
a case for all static "class methods" to be called with a package
qualifier rather than as class methods.
this is mainly a question of uniformity of api and if is it alright to
break
something that's been put out there in a stable release.
indeed, uniformity of API is why i want to change it, and the fact that
it will break things is why i'm putting it up for discussion.
while we're at it we probably ought to take out the prototype keyword
unless its in there for a specific reason as we haven't used it
anywhere else.
the prototype tells the parser how many and what type arguments that
particular function wants --- in this case, it wants one scalar, and
the prototype keeps the parser from giving all the elements in a comma
expression to the function call.
basically, the prototype allows you to omit the parentheses on calls to
that function, making it behave more like a perl builtin.
-
muppet <scott at asofyet dot org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]