Mailing List Archive

Two further features, one definitely needed for survival, other likely needed.
Besides fixing the language incompatibility introduced by the removal of
auto-deref, 2 other features largish features are on my table. I'm not
certain how difficult they are, but such is life.

1) Making future perl-libs backward compatible so programs don't need
rebuilding of their binary parts.

Precedent: libc (glibc). Apparently it has been the case for some time,
but as each new version of glibc is introduced, brought about by some
incompatibility in the new API, the old API's are listed as being
satisfied within the new library. I.e. programs built against
glibc-X are guaranteed to run with glibc-X+1, +2, +3...

This would imply that new versions of libperl-5.x would be useable by
programs built against earlier versions. This would be a forward
compatibility from some specific perl version, going forward.

It may be that it would start with 5.34, such that progs built
against 5.34 work with perl-lib 5.36. Going back before 5.34 would
be a separate issue on a version/by/version basis.


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).

Only programs observing safe definitions & restrictions would be able
to make use of the new syntax.

This would allow a perl program to be much less busy and less complicated as
users wouldn't need to to prepend sigils to everything (possibly only to
calls/usages of old code).

Of course, this is taking perl's knowledge of the type of a 'symbol'
to the next logical step. If a new program doesn't over-define a symbol
to be of more than one type, it wouldn't need sigils to disambiguate them.
It does require that all symbols be defined so perl knows their type.

For many users -- especially new users, this new semantic would
eliminate the
largest single complaint about perl.

Fortunately or unfortunately, I believe you'll find auto-deref to be
"assumed" to work, since if one has a sigil-less symbol, you have even
less type-syntax (in the form of a sigil prefix) than you would with
auto-deref. I didn't dream up this idea of sigil-less syntax to support
auto-deref, but I have seen restoring auto-deref as a necessary step, as
well as being consistent with current perl syntax supporting random-access
item dereferencing. ($aref->[X], $href->{X})

It may not seem like a sexy research topic, but I do believe it to be
necessary to save the language from its largest criticism.

-A*a
Re: Two further features, one definitely needed for survival, other likely needed. [ In reply to ]
On Sun, 23 May 2021 12:33:58 -0700
L A Walsh <astara@tlinx.org> wrote:

> 2) Going 'unnecessary-sigil' optional.

My personal response here:

If you wanted Python, you know where to find it.

--
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/
Re: Two further features, one definitely needed for survival, other likely needed. [ In reply to ]
On Sun, 23 May 2021 12:33:58 -0700
L A Walsh <astara@tlinx.org> wrote:

> Besides fixing the language incompatibility introduced by the removal of
> auto-deref, 2 other features largish features are on my table. I'm not
> certain how difficult they are, but such is life.
>
> 1) Making future perl-libs backward compatible so programs don't need
> rebuilding of their binary parts.
>
> Precedent: libc (glibc). Apparently it has been the case for some time,
> but as each new version of glibc is introduced, brought about by some
> incompatibility in the new API, the old API's are listed as being
> satisfied within the new library. I.e. programs built against
> glibc-X are guaranteed to run with glibc-X+1, +2, +3...
>
> This would imply that new versions of libperl-5.x would be useable by
> programs built against earlier versions. This would be a forward
> compatibility from some specific perl version, going forward.
>
> It may be that it would start with 5.34, such that progs built
> against 5.34 work with perl-lib 5.36. Going back before 5.34 would
> be a separate issue on a version/by/version basis.

This isn't happening. Maintaining binary compatibility between *minor*
releases is already problematic, see [1] for a recent example, so we
*definitely* aren't going to extend our guarantees even further.

> 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).
>
> Only programs observing safe definitions & restrictions would be able
> to make use of the new syntax.
>
> This would allow a perl program to be much less busy and less complicated as
> users wouldn't need to to prepend sigils to everything (possibly only to
> calls/usages of old code).
>
> Of course, this is taking perl's knowledge of the type of a 'symbol'
> to the next logical step. If a new program doesn't over-define a symbol
> to be of more than one type, it wouldn't need sigils to disambiguate them.
> It does require that all symbols be defined so perl knows their type.
>
> For many users -- especially new users, this new semantic would eliminate the
> largest single complaint about perl.
>
> Fortunately or unfortunately, I believe you'll find auto-deref to be
> "assumed" to work, since if one has a sigil-less symbol, you have even
> less type-syntax (in the form of a sigil prefix) than you would with
> auto-deref. I didn't dream up this idea of sigil-less syntax to support
> auto-deref, but I have seen restoring auto-deref as a necessary step, as
> well as being consistent with current perl syntax supporting random-access
> item dereferencing. ($aref->[X], $href->{X})
>
> It may not seem like a sexy research topic, but I do believe it to be
> necessary to save the language from its largest criticism.

https://www.nntp.perl.org/group/perl.perl5.porters/2021/05/msg260068.html

[1] - https://github.com/Perl/perl5/issues/17154
Re: Two further features, one definitely needed for survival, other likely needed. [ In reply to ]
We can even remove sigils in cases where variable names are overloaded:

my $a = 1
my @a = {2)
my %a = {3=>4}

a[0] = 3; # Clearly an array reference
a{3} = 6; # Clearly a hash reference

User defined operators can further ameliorate this situation:

a *@* 1 = 2; # Assign an element to an array
a *%* 3 = 7; # Assign to an element of a hash.

The advantage of making Perl capable of optionally emulating other
languages via *use autoderef* , *no sigils, *user defined infix operators
etc. is that it provides a frictionless path along which people tired of
the failings and autocracy of the lesser languages can easily migrate to
the freedom and justice for all guaranteed by Perl. The converse action,
actively pushing away users who have given their lives to Perl merely
hastens our decline and the day of our fall and if we were to do that ( I
am sure we would not), then we would deserve no better fate.


On Sun, May 23, 2021 at 8:44 PM Paul "LeoNerd" Evans <leonerd@leonerd.org.uk>
wrote:

> On Sun, 23 May 2021 12:33:58 -0700
> L A Walsh <astara@tlinx.org> wrote:
>
> > 2) Going 'unnecessary-sigil' optional.
>
> My personal response here:
>
> If you wanted Python, you know where to find it.
>
> --
> Paul "LeoNerd" Evans
>
> leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS
> http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/
>
Re: Two further features, one definitely needed for survival, other likely needed. [ In reply to ]
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.
Re: Two further features, one definitely needed for survival, other likely needed. [ In reply to ]
Linda, Phillp:

On Sun, May 23, 2021 at 12:33:58PM -0700, L A Walsh wrote:

> 2) Going 'unnecessary-sigil' optional.


On Sun, May 23, 2021 at 09:16:46PM +0100, Philip R Brenan wrote:
> We can even remove sigils in cases where variable names are overloaded:

Neil has already written that "Perl is going to stay Perl"

https://www.nntp.perl.org/group/perl.perl5.porters/2021/05/msg260068.html

We want to make perl a better Perl, not a different
language. We're not going to switch to Raku's model for sigils, or
change to . instead of ->, for example.

Don't propose changes that go against these principles.


We are *NOT* going to remove sigils. Even in certain circumstances, as
getting the corner cases right for those is hard (see below)

Please stop suggesting changes that go against clear decisions of the PSC.

You are wasting everyone's time, and *I* certainly don't appreciate this.

On Sun, May 23, 2021 at 08:43:40PM +0100, Paul "LeoNerd" Evans wrote:
> On Sun, 23 May 2021 12:33:58 -0700
> L A Walsh <astara@tlinx.org> wrote:
>
> > 2) Going 'unnecessary-sigil' optional.
>
> My personal response here:
>
> If you wanted Python, you know where to find it.

Given my above comments, I appreciate the frustration, but pithy one line
comments don't add value.

As part of a longer explanation, it would be different. For example:


On Mon, May 24, 2021 at 09:38:28AM +0300, Alexandr Evstigneev wrote:
> 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.

Thanks for thinking this through, and writing a clear explanation.


So, "removing sigils" has been discussed and is not feasible


It is not happening. No more mails about it.

Nicholas Clark
Re: Two further features, one definitely needed for survival, other likely needed. [ In reply to ]
On Sun, May 23, 2021 at 10:00:39PM +0200, Tomasz Konojacki wrote:
> On Sun, 23 May 2021 12:33:58 -0700
> L A Walsh <astara@tlinx.org> wrote:

This is a sensible suggestion, but

1) I'm not sure whether we could even get this right if we wanted to
2) The opportunity cost of attempting it is too high

We're not gong to do it.

> > 1) Making future perl-libs backward compatible so programs don't need
> > rebuilding of their binary parts.
> >
> > Precedent: libc (glibc). Apparently it has been the case for some time,
> > but as each new version of glibc is introduced, brought about by some
> > incompatibility in the new API, the old API's are listed as being
> > satisfied within the new library. I.e. programs built against
> > glibc-X are guaranteed to run with glibc-X+1, +2, +3...
> >
> > This would imply that new versions of libperl-5.x would be useable by
> > programs built against earlier versions. This would be a forward
> > compatibility from some specific perl version, going forward.
> >
> > It may be that it would start with 5.34, such that progs built
> > against 5.34 work with perl-lib 5.36. Going back before 5.34 would
> > be a separate issue on a version/by/version basis.
>
> This isn't happening. Maintaining binary compatibility between *minor*
> releases is already problematic, see [1] for a recent example, so we
> *definitely* aren't going to extend our guarantees even further.

We used to do (roughly) this two decades ago, but in a limited fashion.
You could build (say) 5.004 the default way, or you could opt to build it
compatible with 5.003. *But* your options for building 5.005 were only
"current" or "like 5.004" - there was no indefinite guarantee, and it was
only intended as a transition system.

Also both "perl" and "CPAN" were much smaller then (how much API was exposed,
and how much code was consuming it, and relying on it)

IIRC 5.8.0 didn't offer this because it was not possible to implement the
needed internal improvements in any way that could be wedged into 5.6-land,
so the feature was dropped. To my knowledge, no-one has asked for it since,
and no-one had really missed it.


As Tomasz says, Maintaining binary compatibility between *minor* releases is
hard. I was doing it for most of maint-5.8. You have to look at every change
not just with "is this correct?" "does this add regressions?" but also
"is this compatible with code compiled against the previous version(s)"

This means obvious things like:

* you can't re-order structs or change the types of any members

but subtle things:

* you can't add anything at the *end* of structs, if that struct is embedded
into any other struct. (Strictly, "at all", if that struct is exposed to
CPAN code that could do this)


Those sort of constrains would prevent all sorts of runtime optimisations
that we have made. For example the large amount of structure re-ordering and
rationalisation that I did between 5.8.0 and 5.10.0, which reduced both
memory usage and CPU cache lookup.



Thirdly, my observations both of how OS distributions seem to work, and
every firm that I've worked at that has built its own perl from source:

It seems that even the work of trying to maintain binary compatibility
*within* minor versions is mostly wasted. For any given version, OSes seem
to stick on the exact x.y.z version that they started on, and then
"backport" patches from our x.y.z+1 (etc) versions to their "x.y.z",
without changing its "x.y.z", or relying on adding earlier versions to @INC.

Firms I've observed are even more conservative - they don't tend to backport
*any* patches, treat an upgrade to x.y.z+1 or x.y+2.* with equal
trepidation.



Of comparable languages (dynamic programming languages implemented in C as
monolithic compilers/interpreters exposing a large C extension API) I
think that

1) only Python has any concept of a stable A*B*I
2) that's also a much more limited set of calls than the general API
3) Python's API generally is way better and way cleaner than ours

We're not in the situation that (say) glibc is - we are not supporting a
compiled language where folks *ship* binaries, and many end users don't
have the source code to the programs that they run.



Doing this well - well enough to be trustworthy - requires a lot of human
judgement calls, from folks with particular skills. We don't have many
people who can do that. If they are tied up doing this, they can't add
features (or fix bugs) - improvements which far more people benefit from.

Not doing this generally means that computers have to work harder,
(re)compiling more code. Computers scale better than humans, particularly
volunteers.


So we can't offer an stable ABI.


Nicholas Clark
Re: Two further features, one definitely needed for survival, other likely needed. [ In reply to ]
??, 24 ??? 2021 ?. ? 13:21, Nicholas Clark <nick@ccl4.org>:

> It seems that even the work of trying to maintain binary compatibility
> *within* minor versions is mostly wasted. For any given version, OSes seem
> to stick on the exact x.y.z version that they started on, and then
> "backport" patches from our x.y.z+1 (etc) versions to their "x.y.z",

But breaking binary compatibility would make their work harder, not
easier. They'd need to either force-upgrade versions of all dependent
packages (to effectively rebuild them) or now they instead of us have
to review all patches for breakage. It doesn't look like a fair
exchange. Furthermore, that could lead to code running on 5.x.y on one
platform to have one set of not-fixed bugs, but running with a
different set on another platform - due to them choosing different
strategies. It's not impossible now, but foregoing binary in point
releases compatibility extravagets it.

Best regards,
Sergey Aleynikov
Re: Two further features, one definitely needed for survival, other likely needed. [ In reply to ]
Nicholas Clark writes:
> On Sun, May 23, 2021 at 10:00:39PM +0200, Tomasz Konojacki wrote:
> It seems that even the work of trying to maintain binary compatibility
> *within* minor versions is mostly wasted. For any given version, OSes seem
> to stick on the exact x.y.z version that they started on, and then
> "backport" patches from our x.y.z+1 (etc) versions to their "x.y.z",
> without changing its "x.y.z", or relying on adding earlier versions to @INC.

Cygwin doesn't do this (and other rolling releases also don't offer
multi-version Perl). I'll usually wait for the x.y.1 version to do a
full rebuild of everything that uses Perl and then update to the further
point releases without incurring that effort. I've got to the point
where I could do an update including all Perl modules in Cygwin twice
within a day if I need to, but the other other maintainers with Perl
dependencies will have to update their packages as well (there is only a
single Perl version in Cygwin), making this a multi-week process in
reality. I've only had one instance where I've had to revert something
to keep things binary compatible (the move of the interpreter variables
if anyone needs to know). I know it isn't _guraranteed_ to work, but so
far I've been lucky and/or the release managers have been taking their
job seriously.

> Firms I've observed are even more conservative - they don't tend to
> backport *any* patches, treat an upgrade to x.y.z+1 or x.y+2.* with
> equal trepidation.

I'm witness to how that plays out in practise and anybody whose turn it
is to use the remaining brain cell in the IT department thinks that's a
stupid thing to do, not that they can change that situation. None of
the vendors can agree what version that "single Perl" is going to be, so
in the end you have even more work to do; both while supporting the
current "official" Perl versions in their frozen (but slightly buggy)
state and when the dreaded time comes around that everyone decides they
need to update to a new set of incompatible versions.

[…]
> So we can't offer an stable ABI.

I hope you didn't want to say that the .z part of the versioning is
going to go away. But if you stop making at least the promise that you
don't knowingly break ABI compatibility in minor releases then I'd
suggest you drop that part of the versioning to make it clear to
everybody what is going on. Whether anyone left holding the bag will
pick up after that (what about security patches etc.) remains to be
seen.


Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables
Re: Two further features, one definitely needed for survival, other likely needed. [ In reply to ]
On Mon, May 24, 2021 at 06:20:37PM +0200, Achim Gratz wrote:
> Nicholas Clark writes:

> > So we can't offer an stable ABI.
>
> I hope you didn't want to say that the .z part of the versioning is
> going to go away. But if you stop making at least the promise that you
> don't knowingly break ABI compatibility in minor releases then I'd
> suggest you drop that part of the versioning to make it clear to
> everybody what is going on. Whether anyone left holding the bag will
> pick up after that (what about security patches etc.) remains to be
> seen.

I wasn't clear at all. Sorry. It was in the context of what Linda was
suggesting we change/improve, and I meant

"So we can't offer a stable ABI across 5.34.z => 5.36.z => 5.40.z"
(or whatever they end up being called)

ie "we can't make any more ABI guarantees than what we currently do for
.z releases"

Nicholas Clark
Re: sigil-optional subject clarification [ In reply to ]
This is meant to be a quick note. I have a more thorough reply I've been
constructing for point "1", but on point 2, i.e.:
> 2) Going 'unnecessary-sigil' optional.
---
There is a big difference between "getting rid of all sigils" and
"creating a language with no sigils", and what is stated in #2.

The above has 2 important points: "unnecessary" and "optional"

Nothing in the above would require removing any sigils in existing programs
(or future programs). Treating a sigil-less symbol as valid would require
that under current perl rules, the same symbol would fail to compile if
"use
strict" was used. Example;

#!/usr/bin/perl
use warning;
use opsig; #optional_sigals

my $x = 11;
my $y = x + 5;

Under current "strict" rules, "x" would be flagged with an error.

Under "opsig", perl would, instead recognize that the only symbol
defined in that context named "x", is the 'my' statement in the previous
line.

If the symbol could have an alternate meaning or definition, then perl
would flag it as an "exception".

If in the same example, there was an

sub x { #do x-stuff }

or a statement like:

our @x=(qw(array x things));

Then perl cannot know what type 'x' is and would flag any use
of a raw 'x' as an error.

Similarly, if the user tried to write:

my $x = 11;
my $y = x->[0];

they would get a similar error they would now get by saying

my $y = $x->[0]; #as the 2nd statement:

Can't use string ("11") as an ARRAY ref while "oprefs" in use at -e line 2.

Anyway, need to run and hope this clarifies my intent -- that it was not
to create an incompatible replacement. Just turn "strict" errors into
something useful under the right pragma.


>
Re: sigil-optional subject clarification [ In reply to ]
Hi Linda,

Please stop bringing this topic up on p5p.

If you want to give this a go, we’d be happy to hear about this once you’ve got working code that passes all of Perl’s tests and doesn’t break CPAN. If others want to join you in that endeavour, you could set up a mailing list for discussing that work. p5p is not that mailing list.

Until then, no further discussion of this here please.

Thanks,
Neil
Re: sigil-optional subject clarification [ In reply to ]
On 2021/05/26 02:03, Neil Bowers wrote:
> Hi Linda,
>
> Please stop bringing this topic up on p5p.
>
What are you talking about? This is the 1st time I've brought
this up. Are you confusing a sigil-optional syntax with something
else?
Re: Two further features, one definitely needed for survival, other likely needed. [ In reply to ]
On 2021/05/23 13:16, Philip R Brenan wrote:
> We can even remove sigils in cases where variable names are overloaded:
>
> my $a = 1
> my @a = {2)
> my %a = {3=>4}
>
> a[0] = 3; # Clearly an array reference
> a{3} = 6; # Clearly a hash reference
>
----
*Perhaps*, though my first inclination is not -- only because
I'm not certain that it might not be confused -- I'd prefer to leave
that for a future stage, since I've only thought through the case
of there being one form of a symbol defined. I.e. I'm being
a conservative as possible to ensure there is no conflict with current
code. At the very least, I think you may have meant 'my @a=();'?

> User defined operators can further ameliorate this situation:
>
> a *@* 1 = 2; # Assign an element to an array
> a *%* 3 = 7; # Assign to an element of a hash.
>
----
This may also be a possibility, however, clearly, using "user
defined operators" is a separate issue from using what is currently
an "error-space": something that would normally be an error under
the strict pragma. I'm proposing a different behavior be allowed under
a different pragma.

> On Sun, May 23, 2021 at 8:44 PM Paul "LeoNerd" Evans <leonerd@leonerd.org.uk>
> wrote:
>
>
>> My personal response here:
>>
>> If you wanted Python, you know where to find it.
>>
----
I wasn't aware that python used sigils. How could you consider
a sigil optional syntax having anything to do with a language that
doesn't use sigils by default?
Re: sigil-optional subject clarification [ In reply to ]
Hi Linda,
> What are you talking about? This is the 1st time I've broughtthis up. Are you confusing a sigil-optional syntax with something else?

In your email with subject "Two further features …", the 2nd point was "Going 'unnecessary-sigil' optional".

Nick replied to you, saying:
> We are *NOT* going to remove sigils […]Please stop suggesting changes that go against clear decisions of the PSC.

You then followed up with this email, subject "sigil-optional subject clarification".

Just to be clear, we’re saying no more discussion on changing the sigility of Perl, whether that’s removing sigils, making them optional, or some other change. Sigils are here to stay.

Thanks,
Neil
Re: sigil-optional subject clarification [ In reply to ]
On Wed, May 26, 2021, at 8:57 PM, L A Walsh wrote:
> On 2021/05/26 02:03, Neil Bowers wrote:
> > Hi Linda,
> >
> > Please stop bringing this topic up on p5p.
>
> What are you talking about? This is the 1st time I've brought
> this up. Are you confusing a sigil-optional syntax with something
> else?

Linda,

I wanted to chime in here: Neil's right, you mentioned this twice, *but* I think this exchange sounds a lot like "Dangit, Linda, how many times have we told you [personally]!" I don't think that's at all the impression anybody wants to make. The topic has come up a number of times over the past six to twelve months, and you had the unlucky fortune to be the person to bring it up after the "we need to stop going down these avenues."

Sorry that this probably felt like a much more directed-at-you-personally thing than I think it was meant to be.

--
rjbs
Re: Two further features, one definitely needed for survival, other likely needed. [ In reply to ]
Den 2021-05-23 kl. 21:33 skrev L A Walsh:
> 2) Going 'unnecessary-sigil' optional.

You've clearly put some thought into this, and there's nothing on face
value that I would regard as impossible in your proposal.

That said, I don't see it ever being enabled by default in any version
of Perl for a couple of reasons:

1. It feels "unperlish".

2. It seems to admit that sigils were a bad idea from the beginning.
I don't think everyone agrees about that. I don't think I personally do.

3. Many parts of Perl have been designed with the assumption that
variables have sigils. For example, let's assume that Perl never had
sigils. If that had been the case, I would doubt that lists would act
the way they do in Perl.

This

x = (0, 0);
y = 1;
z = (x, y); # z is (0, 0, 1)

just doesn't seem intuitive to me, and I suspect that it would trip up
most people, just like the UNIX shell's word splitting does.

Once you add sigils, however:

@x = (0, 0);
$y = 1;
@z = (@x, $y); # @z is (0, 0, 1)

... the intention is much more clear and the automatic list flattening
is no longer a foot gun; instead, it becomes a very useful feature.

In summary, sigils likely make a lot of useful Perl syntax possible --
syntax that would be hard to remove from Perl without transforming it
into an entirely different language.
Re: Two further features, one definitely needed for survival, other likely needed. [ In reply to ]
no sigils;
x = (0, 0);
y = 1;
z = (x, y); # z is (0, 0, 1)

Your sigil free version is much easier to understand!


On Sun, Jul 4, 2021 at 2:23 PM John Ankarström <john@ankarstrom.se> wrote:

> Den 2021-05-23 kl. 21:33 skrev L A Walsh:
> > 2) Going 'unnecessary-sigil' optional.
>
> You've clearly put some thought into this, and there's nothing on face
> value that I would regard as impossible in your proposal.
>
> That said, I don't see it ever being enabled by default in any version
> of Perl for a couple of reasons:
>
> 1. It feels "unperlish".
>
> 2. It seems to admit that sigils were a bad idea from the beginning.
> I don't think everyone agrees about that. I don't think I personally do.
>
> 3. Many parts of Perl have been designed with the assumption that
> variables have sigils. For example, let's assume that Perl never had
> sigils. If that had been the case, I would doubt that lists would act
> the way they do in Perl.
>
> This
>
> x = (0, 0);
> y = 1;
> z = (x, y); # z is (0, 0, 1)
>
> just doesn't seem intuitive to me, and I suspect that it would trip up
> most people, just like the UNIX shell's word splitting does.
>
> Once you add sigils, however:
>
> @x = (0, 0);
> $y = 1;
> @z = (@x, $y); # @z is (0, 0, 1)
>
> ... the intention is much more clear and the automatic list flattening
> is no longer a foot gun; instead, it becomes a very useful feature.
>
> In summary, sigils likely make a lot of useful Perl syntax possible --
> syntax that would be hard to remove from Perl without transforming it
> into an entirely different language.
>
>
Re: Two further features, one definitely needed for survival, other likely needed. [ In reply to ]
I think it's a good idea to respect this:

On Mon, 24 May 2021 09:54:01 +0200, Nicholas Clark <nick@ccl4.org> wrote:

> Thanks for thinking this through, and writing a clear explanation.
>So, "removing sigils" has been discussed and is not feasible
>It is not happening. No more mails about it.
>Nicholas Clark

--
With regards,
Christian Walde

On Sun, 04 Jul 2021 19:17:39 +0200, Philip R Brenan <philiprbrenan@gmail.com> wrote:

> no sigils;
> x = (0, 0);
> y = 1;
> z = (x, y); # z is (0, 0, 1)
>
>> Your sigil free version is much easier to understand!
>
>
>> On Sun, Jul 4, 2021 at 2:23 PM John Ankarstr?m <john@ankarstrom.se> wrote:
>> Den 2021-05-23 kl. 21:33 skrev L A Walsh:
>>> 2) Going 'unnecessary-sigil' optional.
>>
>> You've clearly put some thought into this, and there's nothing on face
>> value that I would regard as impossible in your proposal.
>>
>> That said, I don't see it ever being enabled by default in any version
>> of Perl for a couple of reasons:
>>
>> 1. It feels "unperlish".
>>
>> 2. It seems to admit that sigils were a bad idea from the beginning.
>> I don't think everyone agrees about that. I don't think I personally do.
>>
>> 3. Many parts of Perl have been designed with the assumption that
>> variables have sigils. For example, let's assume that Perl never had
>> sigils. If that had been the case, I would doubt that lists would act
>> the way they do in Perl.
>>
>> This
>>
>> x = (0, 0);
>> y = 1;
>> z = (x, y); # z is (0, 0, 1)
>>
>> just doesn't seem intuitive to me, and I suspect that it would trip up
>> most people, just like the UNIX shell's word splitting does.
>>
>> Once you add sigils, however:
>>
>> @x = (0, 0);
>> $y = 1;
>> @z = (@x, $y); # @z is (0, 0, 1)
>>
>> ... the intention is much more clear and the automatic list flattening
>> is no longer a foot gun; instead, it becomes a very useful feature.
>>
>> In summary, sigils likely make a lot of useful Perl syntax possible --
>> syntax that would be hard to remove from Perl without transforming it
>> into an entirely different language.
Re: Two further features, one definitely needed for survival, other likely needed. [ In reply to ]
Den 2021-07-05 kl. 03:53 skrev Christian Walde:
> I think it's a good idea to respect this:
>
> On Mon, 24 May 2021 09:54:01 +0200, Nicholas Clark <nick@ccl4.org> wrote:
>
>> Thanks for thinking this through, and writing a clear explanation.
>>
>> So, "removing sigils" has been discussed and is not feasible
>>
>> It is not happening. No more mails about it.
>>
>> Nicholas Clark

Thanks Christian, I missed that message.
Re: Two further features, one definitely needed for survival, other likely needed. [ In reply to ]
* John Ankarstrm <john@ankarstrom.se> [2021-07-05 13:26:20 +0200]:

> Den 2021-07-05 kl. 03:53 skrev Christian Walde:
> > I think it's a good idea to respect this:
> >
> > On Mon, 24 May 2021 09:54:01 +0200, Nicholas Clark <nick@ccl4.org> wrote:
> >
> >> Thanks for thinking this through, and writing a clear explanation.
> >>
> >> So, "removing sigils" has been discussed and is not feasible
> >>
> >> It is not happening. No more mails about it.
> >>
> >> Nicholas Clark
>
> Thanks Christian, I missed that message.
>

I can see "sigil-less Perl" be a subset sort of thing, like "standard
perl". I can't claim this to be true, but something is nagging at
me that removing sigils was indeed part of this effort. In any
case, like all efforts to do something really crazy, there's always
been a concession that said radical thing only was available for
a subset of Perl.

In addition the the sigil thing being wholly unpopular amongst most
Perl/perl people, many "perlish" things require the disambiguation
and context that the sigils offer,

Cheers,
Brett

--
--
oodler@cpan.org
oodler577@sdf-eu.org
SDF-EU Public Access UNIX System - http://sdfeu.org
irc.perl.org #openmp #pdl #native