Skip to content

[Feature] Allow comparison expressions between strings based on their codepoints like in standard JavaScript #718

Description

@Luna-Klatzer

Is there an existing proposal for this?

  • I have searched the existing issues

This feature does not exist in the latest version

  • I am using the latest version

Proposal

Currently writing a comparison expression between strings causes an error, as they generally are not considered of numeric value. However, in standard JavaScript comparing strings is allowed due to the fact that they have a codepoint value corresponding to their Ascii/UTF-16 value. Using this value, comparisons can be performed and expressions like "A" < "a" are evaluated as true given their codepoints being 65 and 97 respectively.

Exact behaviour / changes you want

  • Implement support for string comparisons.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featureNew feature or enhancement

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions