Skip to content

Conversation

@khwilliamson
Copy link
Contributor

This is already the claimed allowed length. But that is a lie, until this commit. Instead, a limiting buffer has been 256 bytes long, which means, we can have 256 1-byte characters in an identifier; but only 128 2-byte ones, etc. Unicode can have 4-byte identifier characters, so our limit has really been just 64 for those.

The direction perl is supposed to be going, according to perldiag, is to eliminate any identifier length limit. I don't feel the urge to do that now, but simply increasing the buffer size to accommodate any 256 Unicode identifier characters causes us to meet our current claim.

The trickiest part of this by far was to get parser.t to pass, which contrary to perldiag, tests very specifically about identifiers just shy of 256.

  • This set of changes may require a perldelta entry,

This value is the maximum number of bytes required to represent in UTF-8
any code point in the legal Unicode range of 0 .. 0x10FFFF
This is already the claimed allowed length.  But that is a lie, until
this commit.  Instead, the buffer has been 256 bytes long, which means,
we can have 256 1-byte characters in an identifier; but only 128 2-byte
ones, etc.  Unicode can have 4-byte identifier characters, so our limit
has really been just 64 for those.

The direction perl is supposed to be going, according to perldiag, is to
eliminate any identifier length limit.  I don't feel the urge to do that
now, but simply increasing the buffer size to accommodate any 256
Unicode identifier characters causes us to meet our claim.

The trickiest part of this by far was to get parser.t to pass, which
contrary to perldiag, tests very specifically about identifiers just shy
of 256.

One thing it does is to create a long string.  I just replaced every
character in it by 4 repeats, and then split into shorter lines.
@khwilliamson khwilliamson merged commit 8785c11 into Perl:blead Sep 30, 2025
34 checks passed
@khwilliamson khwilliamson deleted the chars255 branch September 30, 2025 16:57
khwilliamson added a commit to khwilliamson/perl5 that referenced this pull request Sep 30, 2025
khwilliamson added a commit to khwilliamson/perl5 that referenced this pull request Oct 1, 2025
khwilliamson added a commit to khwilliamson/perl5 that referenced this pull request Oct 1, 2025
khwilliamson added a commit that referenced this pull request Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants