develooper Front page | perl.perl5.porters | Postings from June 2008

Re: autodie.pm design questions

From:
davidnicol
Date:
June 2, 2008 11:17
Subject:
Re: autodie.pm design questions
Message ID:
934f64a20806021117g33658b56gb3e72053ba12ba55@mail.gmail.com
A, Pagaltzis wrote:
> Therefore, we agreed that it would be better to put new semantics in a new interface that shall obsolete the old one.

Did we agree what to call it?  I'd like to propose "Fatalize" which
can start a trend of adding -ize to mean "Just like the legacy
version, but lexically scoped!"

On 6/2/08, Aristotle Pagaltzis <pagaltzis@gmx.de> wrote:
> Hi Roland,
>
> * Roland Giersig <rgiersig@cpan.org> [2008-06-02 17:45]:
>> I'm wondering, would it be feasible to retrofit Fatal so it
>> also can work locally? This would mean to rename/alias autodie
>> to Fatal and add some backward-compatibility sugar.
>
> you're reopening issues that have already been hashed out. Please
> look up the old threads if the summary at the end of this mail
> does not satisfy you, as we've been over this in some detail.
>
>> If Fatal is used in non-global scope, emit a warning that it
>> should be moved to global scope.
>
> And you are sure it should be, how?
>
> Perl lets people put their `use`s wherever they want and I make
> use of that with some frequency.
>
> The documentation of Fatal.pm is also perfectly clear about how
> it works.
>
> So if I happen to put a `use Fatal` line in the middle of a
> nested scope there is zero point in it telling me that I did so.
>
>> Or you could
>>
>>  use Fatal::Locally;
>>
>> which would make all following scoped Fatals act locally.
>
> Action at a distance does not a good way to design an API make.
>
>> I'm not opposing the autodie name, please see these suggestions
>> as an addition and as a trial to rectify the somewhat broken
>> semantics of Fatal.
>
> The legacy semantics of Fatal.pm will need to be supported in the
> future since it has been around for around a decade. Trying to
> fix it means there will interactions between global and lexical
> semantics, and the consensus of our previous discussion was that
> the corner cases cannot be resolved in a non-confusing way.
>
> Therefore, we agreed that it would be better to put new semantics
> in a new interface that shall obsolete the old one.
>
> Regards,
> --
> Aristotle Pagaltzis // <http://plasmasturm.org/>
>


-- 
"do it first and allow the implications of what has been done to
settle in." -- Moglen on practical revolution



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About