develooper Front page | perl.perl5.porters | Postings from May 2016

Re: [perl #125106] Why are threads discouraged?

Thread Previous | Thread Next
From:
Sawyer X
Date:
May 11, 2016 17:54
Subject:
Re: [perl #125106] Why are threads discouraged?
Message ID:
573371DD.5030900@gmail.com


On 05/10/2016 10:22 PM, Eric Brine wrote:
> On Tue, May 5, 2015 at 1:49 PM, Rocco Caputo <rcaputo@pobox.com
> <mailto:rcaputo@pobox.com>>wrote:
>
>     > On May 5, 2015, at 11:23, Eric Brine <perlbug-followup@perl.org
>     <mailto:perlbug-followup@perl.org>> wrote:
>     >
>     > # New Ticket Created by  "Eric Brine"
>     > # Please include the string:  [perl #125106]
>     > # in the subject line of all future correspondence about this issue.
>     > # <URL: https://rt.perl.org/Ticket/Display.html?id=125106
>     <https://rt.perl.org/Ticket/Display.html?id=125106>>
>     >
>     >
>     > threads.pm <http://threads.pm>says:
>     >
>     > The use of interpreter-based threads in perl is officially
>     discouraged.
>     >
>     >
>     > Why is that? Is it just because they're rather heavy? If so, why
>     not just
>     > say so and let the user decide whether he wants to use them or
>     not? After
>     > all, heavy threads aren't a problem if you reuse them (as in a
>     worker
>     > model).
>
>     If your documentation is anything like mine, the paragraph before
>     that statement tries to explain why.  Perhaps the discouragement
>     should begin with "Because of this, the use of...." to hint that
>     the reader may have skipped something important and to discourage
>     people from taking a provocative statement out of context.
>
>
> One might think that, except that the word "discouraged" is linked to
> a definition that means something quite different than "not to be used
> without understanding what it means that Perl threads are heavy". It
> actually defines "discouraged" as "we'd like to get rid of them, but
> we're not doing it now"
>
>   * *discouraged*
>
>     From time to time, we may mark language constructs and features
>     which we consider to have been mistakes as *discouraged*.
>     Discouraged features aren't currently candidates for removal, but
>     we may later deprecate them if they're found to stand in the way
>     of a significant improvement to the Perl core.
>

I agree this is a confusing description.

I also like Rocco's comments on describing *why* something is the way it
is, even if briefly. I found an example in the thread Rocco linked[1],
by Aristotle, on how to explain things briefly and clearly:

"complex data structures are hard to share properly"

The quote is out of context and does not constitute as the patch I would
envision, but it's an example of how to describe something complicated
succinctly. Perhaps we can form a patch describing what we mean by
"discouraged". Having context might excuse us from trying to find a
better term for this than "discouraged".

[1] Thanks, Rocco!

Thread Previous | Thread Next


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