Skip to content

1.2.0 - Support for ranges, deprecated `[safe:]`

Choose a tag to compare

@KyNorthstar KyNorthstar released this 20 May 22:56
4d1ce51

What's New

You can now use these kinds of ranges to safely access any elements in any random-access collection whose indices are strideable (Most Foundation collections are this way):

  • Range
  • ClosedRange
  • PartialRangeFrom
  • PartialRangeUpTo
  • PartialRangeUpThrough

What's Old

I chose to deprecate [safe:]. It was solely an alias to [orNil:], and its name describes the whole point of every API this package, thus making it nondescript to the point of reducing clarity. Also, it would have required each [orNil:] API to be duplicated to a [safe:] one. Removing it increases clarity and decreases tech debt. It will be removed eventually, in SafeCollectionAccess 2.0.0.