develooper Front page | perl.perl5.porters | Postings from August 2021

Re: Twigils

Thread Previous | Thread Next
From:
Ovid via perl5-porters
Date:
August 15, 2021 06:19
Subject:
Re: Twigils
Message ID:
991181425.398820.1629008360416@mail.yahoo.com
Philip,
I do not know what you mean by "quasi operators" or "As operators they ought to be avoided." Perhaps if I followed P5P more closely I would get it, bu I don't. Right now, one of the biggest problems we're having with Corinna is people saying "yes" or "no" without giving concrete explanations or examples of their reasoning.
For example, here's a slot with a twigil:
    has $:x;

    method inc ($x) {
        $:x += $x;
    } Here are some of the arguments for and against them.
Pros:   
   - You can't accidentally shadow class/instance data. (technical)   

   - Great Huffman encoding for "this is not a regular variable" (social)   

   - Easy to syntax highlight (technical)   


Cons:   
   - No direct parser support for twigils (technical)   

   - Is somewhat controversial (social)   

   - May contribute to "line-noise" complaints (social)   


I can't say that I'm "for" twigils, but so far, that's two strong technical and one strong social argument for them. I see a technical argument against them (I don't know how strong it is) and two rather weak social arguments against them.
At the beginning of the discussion, I was leaning away from twigils. I kind of liked them, but I was swayed by the social arguments. Laying out the pros and cons clearly seems to show a strong benefit to using twigils.
So if you have a strong argument for or against them, if you can clearly describe it, give an example, and explain if it's a technical argument or not, I'd love to hear it (I'm quite serious about this because I'm happy to put a gun to the head of twigils, but I can't see any reason to do so at this point.)
Best,Ovid
-- IT consulting, training, specializing in Perl, databases, and agile developmenthttp://www.allaroundtheworld.fr/. 
Buy my book! - http://bit.ly/beginning_perl 

    On Sunday, 15 August 2021, 03:39:09 CEST, Philip R Brenan <philiprbrenan@gmail.com> wrote:  
 
 Please avoid twigils.  They are quasi operators.  As  operators they ought to be optional.

On Sun, Aug 15, 2021 at 2:09 AM Ricardo Signes <perl.p5p@rjbs.manxome.org> wrote:

On Thu, Aug 12, 2021, at 7:24 AM, Ovid via perl5-porters wrote:

We have not made a decision, but we'd like to know if P5P would consider this acceptable or not. We know that for many people, twigils can be a hot-button issue.


I think twigils are a good idea.

-- 
rjbs
  
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