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

Re: Twigils

Thread Previous | Thread Next
Ovid via perl5-porters
August 15, 2021 06:19
Re: Twigils
Message ID:
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.
   - 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)   

   - 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.)
-- IT consulting, training, specializing in Perl, databases, and agile development 
Buy my book! - 

    On Sunday, 15 August 2021, 03:39:09 CEST, Philip R Brenan <> 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 <> 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.

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