• bitfucker@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    So the only valid digits are arabic numbers but arabic script numbers are not a valid digit? If we want programming to be inclusive then doesn’t that make sense to also include the arabic script number?

    • ChaoticNeutralCzech@feddit.org
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      1 year ago

      So the only valid digits are arabic numbers but arabic script numbers are not a valid digit?

      Some people writing Regex implementations have that opinion. I’ve refrained from saying mine.

      If we want programming to be inclusive then doesn’t that make sense to also include the arabic script number?

      Maybe. IMO, number tests should be chosen/implemented based on the project’s requirements. If you want to include every Unicode character or string pattern anyone’s ever used to convey a numeric value, that would be a long and growing list. Arguably, it’s impossible: the word “elf” means a number if interpreted as German for “eleven” but not if interpreted as English for 🧝.