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

Re: Two further features, one definitely needed for survival, otherlikely needed.

Thread Previous | Thread Next
From:
Alexandr Evstigneev
Date:
May 24, 2021 06:38
Subject:
Re: Two further features, one definitely needed for survival, otherlikely needed.
Message ID:
CA+exGDj_xQndaWsH10TAeZN_aCfcguQ4zohAF+sH1tb=WkNb8g@mail.gmail.com
On Sun, May 23, 2021 at 10:35 PM L A Walsh <astara@tlinx.org> wrote:

> 2) Going 'unnecessary-sigil' optional.
>
> If a symbol has a unique type (SCALAR, sub, HASH, etc), and is declared
> before use by 'whatever appropriate mechanism', and there is no introduced
> ambiguity, then the sigil can be left off.  In any case of ambiguity or
> where the same symbol is used with more than one type, or where the symbol
> isn't defined, a sigil would be required in the same way it currently is.
>
> There are likely sub-issues associated with this, but past programs, that
> use sigils would continue to execute the way they do now (compatibility).
>

And how are new programs supposed to handle this?
I can use the bare `foo` variable declared in my `Foo::Bar::somesub` and
then, some other module adds `foo` sub to my namespace and looks like bare
variable shadows this sub and this is kind  of unexpected.

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