develooper Front page | perl.perl5.porters | Postings from March 2018

[perl #133021] Removed the word "discouraged" from threads'documentation

Thread Next
Jerry D. Hedden via RT
March 27, 2018 00:54
[perl #133021] Removed the word "discouraged" from threads'documentation
Message ID:
As one of several people who have maintained the various threads modules over the years, I regret that I missed being part of the original discussion that lead to the inclusion of the 'discouraged' message.

The fact is that threads work, they are maintained, and they currently do not have any bugs preventing their use.  I acknowledge that not all Perl modules are thread-safe, but there is sufficient documentation to that affect in the POD.

I also acknowledge that the threads implementation is not ideal nor optimal.  Nonetheless, threads are useful, and are being used in the wild.  (I, for one, have even used them to good effect in production code.  <Gasp!>)  Yes, if you don't know what you're doing, threads can be problematic.  ("There be dragons...," and all that.)  However, the same can be argued to greater or lesser degrees of any programming language feature in the hands of unsophisticated users.

I feel that, while the wording of the POD notice is reasonable, the WARNING heading is alarmist.  I feel strongly that the heading should be changed to NOTICE, and the word 'discouraged' be changed to 'not recommended' (as per the original poster's patch).

Since the addition of the 'discouraged' message, I have received several emails from professional Perl developers from around the world expressing concern about it.  I expressed to them the same opinions I have given above, namely that threads work (but you have to know what you're doing), and that threads have not been deprecated.

I'm not trying to convert anyone who doesn't like "interpreter-based threads".  Don't use them as you so choose.  After all, Perl has always been about options.  However, there ARE Perl developers that do feel they are a VERY useful feature.

Just my two cents.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About