Uploaded image for project: 'Swift'
  1. Swift
  2. SR-3006

CharacterSet should have a way of ensuring the wrapped NSCharacterSet is immutable

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Foundation
    • Labels:
      None

      Description

      According to the documentation on NSMutableCharacterSet, mutable character sets are less efficient to work with than immutable character sets (assuming no more mutations need to happen), and therefore it recommends calling copy() to produce an immutable character set once you've finished mutating it.

      However, there appears to be no way to get this behavior with CharacterSet, short of bridging to Obj-C, copying, and bridging back.

      To that end, it would seem to be useful for CharacterSet to have a method that ensures the wrapped character set is immutable.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              lily Lily Ballard
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: