Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specialised substring equality for annotated strs #54302

Merged
merged 1 commit into from
May 2, 2024

Commits on Apr 29, 2024

  1. Specialised substring equality for annotated strs

    The fact that only a string without annotations is equal to a
    non-annotated string (in order to preserve the transitivity of
    equality), makes the generic fallback methods for string comparison
    insufficient.
    
    As such, ==(::AnnoatedString, ::AbstractString) is implemented in
    annotated.jl, but this issue re-appears when dealing with substrings.
    
    The obvious solution is to just implement a specialised method for
    substrings. This does seem potentially a bit whack-a-mole, but I'm
    worried that cleverer solutions might come with subtle issues of their
    own. For now, let's try the simple and obvious solution, and improve it
    later if we can work out a nicer way of handling this issue in general.
    tecosaur committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    6f27021 View commit details
    Browse the repository at this point in the history