Subject: Developers of Sympa
List archive
- From: David Verdin <address@concealed>
- To: address@concealed
- Subject: Re: [sympa-developpers] Why autodie?
- Date: Tue, 20 Feb 2018 10:09:45 +0100
Hi, it's me again,
On 19/02/2018 18:25, Stefan Hornburg (Racke) wrote:
On 02/19/2018 09:41 AM, David Verdin wrote:Not necessarily. for example Sympa::Tools::* module don't really need the object paradigm. If we plan to make them available on CPAN, it would be rude to impose the usage of Moo ii it is not needed.
Dear all,In my opinion using Moo in a module would be the standard, so it should be
Soji just asked on the Sympa discussion channel why eiro wants to use autodie.
I'll try an answer here.
First: Sympatic: The idea of Sympatic is to give future developers a
boilerplate: include all modules that should be
used wherever in Sympa. So adding "use Sympatic;" includes a bunch of modules; adding
"use Sympatic -oo" includes the
same modules plus Moo.
included by default.
So I think the -oo option is quite welcome.
OK, that's a clear point of view. Let's read eiro's argument in favour of autodie now.
Second: autodie. it's included in Sympatic. Using this modules will raise aI'm not in favour of this - we should really take care about the error
die whenever the code can't succeed. eiro's
argument is to make sure an exception will be raised whenever the code does
not behave as intended.
The argument in favour of this module is the decreasing number of lines to
maintina to raise exceptions.
handling by ourselves. Also some operations are
going to fail even if that is acceptable (open on custom files).
Thanks for your answer -and thanks to Soji's answer!
Regards,
David
Regards
Racke
The argument against it, in my opinion, is that, when reading a piece of
code, we won't know that an exception can be
raised in that exact place. I think we should maintain a minimum level of
hand-made exceptions with explicit exception
typing to be able to handle them correctly; the idea is that, in some cases,
exceptions should make Sympa die, and in
other cases it should not.
What is your opinion on this?
Regards,
David
--
"Mieux vaut viser la perfection et la rater que viser la médiocrité et
l'atteindre."
- Francis Blanche
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature
-
Re: [sympa-developpers] Why autodie?
, (continued)
- Re: [sympa-developpers] Why autodie?, Marc Chantreux, 02/22/2018
- Re: [sympa-developpers] Why autodie?, IKEDA Soji, 02/24/2018
- Re: [sympa-developpers] Why autodie?, Stefan Hornburg (Racke), 02/24/2018
-
Re: [sympa-developpers] Why autodie?,
Marc Chantreux, 02/22/2018
-
Re: [sympa-developpers] Why autodie?,
IKEDA Soji, 02/22/2018
- Re: [sympa-developpers] Why autodie?, Marc Chantreux, 02/27/2018
-
Re: [sympa-developpers] Why autodie?,
IKEDA Soji, 02/22/2018
- Re: [sympa-developpers] Why autodie?, David Verdin, 02/20/2018
Archive powered by MHonArc 2.6.19+.