Subject: Developers of Sympa
List archive
- From: IKEDA Soji <address@concealed>
- To: address@concealed
- Subject: Re: [sympa-developpers] RFC: attribute management
- Date: Thu, 25 Jul 2013 17:17:01 +0900
FYI.
PerlMonks: Getter and Setter Function Names
http://www.perlmonks.org/?node_id=249433
On Wed, 24 Jul 2013 22:06:20 +0900
IKEDA Soji <address@concealed> wrote:
> > Fourth, it breaks another good practice, which considers than each
> > method name should be following an explicit naming rule, the more usual
> > being 'action_object' (for instance "send_message", "execute_query',
> > etc...). What does means $robot->main_menu_custom_button_3_target() ?
> >
> > Moreover, those accessors being read only, they'd better get named
> > 'get_something()' than 'something()'. You don't need to be a genious to
> > understand than there is something wrong in
> > '$robot->get_home("/var/lib")', whereas '$robot->home("/var/lib")' is
> > more ambiguous.
>
> This is rather a matter of preference, I suppose.
>
> Previous notation was:
> Sympa::Configuration::get_robot_conf("robot.name", "home")
> Someones prefer to:
> $robot->get_conf("home")
> or:
> $robot->get_home()
> Others do:
> $robot->home
>
> I love the last notation without redundancy: I feel "get_"
> is not required because it is obvious from the context.
--
株式会社 コンバージョン セキュリティ&OSSソリューション部 池田荘児
〒231-0004 神奈川県横浜市中区元浜町3-21-2 ヘリオス関内ビル7F
e-mail address@concealed TEL 045-640-3550
http://www.conversion.co.jp/
-
[sympa-developpers] RFC: attribute management,
Guillaume Rousse, 07/24/2013
-
Re: [sympa-developpers] RFC: attribute management,
IKEDA Soji, 07/24/2013
-
Re: [sympa-developpers] RFC: attribute management,
IKEDA Soji, 07/25/2013
- Re: [sympa-developpers] RFC: attribute management, Guillaume Rousse, 07/25/2013
-
Re: [sympa-developpers] RFC: attribute management,
Guillaume Rousse, 07/25/2013
-
Re: [sympa-developpers] RFC: attribute management,
IKEDA Soji, 07/30/2013
- Re: [sympa-developpers] RFC: attribute management, Guillaume Rousse, 07/30/2013
-
Re: [sympa-developpers] RFC: attribute management,
IKEDA Soji, 07/30/2013
-
Re: [sympa-developpers] RFC: attribute management,
David Verdin, 07/25/2013
-
Re: [sympa-developpers] RFC: attribute management,
Guillaume Rousse, 07/29/2013
- Re: [sympa-developpers] RFC: attribute management, IKEDA Soji, 07/29/2013
- Re: [sympa-developpers] RFC: attribute management, IKEDA Soji, 07/30/2013
-
Re: [sympa-developpers] RFC: attribute management,
David Verdin, 07/31/2013
- Re: [sympa-developpers] RFC: attribute management, IKEDA Soji, 07/31/2013
-
Re: [sympa-developpers] RFC: attribute management,
Guillaume Rousse, 07/29/2013
-
Re: [sympa-developpers] RFC: attribute management,
IKEDA Soji, 07/25/2013
-
Re: [sympa-developpers] RFC: attribute management,
IKEDA Soji, 07/24/2013
Archive powered by MHonArc 2.6.19+.