Repository navigation
v0.1.3
EasyRanges v0.1.3
New features:
-
The method
EasyRanges.normalizeis not exported but may be extended by other packages to implement their own index or index range objects inEasyRanges. -
In the
@rangeor@reverse_rangeexpression, the syntax$(subexpr)may be used to prevent any sub-expressionsubexprfrom being interpreted as a range expression.
Breaking changes:
- Expressions in
@rangeand@reverse_rangeshould only involve array indices (linear indices, i.e. integers, or multi-dimensional Cartesian indices) or objects representing ranges of indices. All such arguments are filtered by theEasyRanges.normalizemethod which shall return an equivalent object in a canonical form. IfEasyRanges.normalizeis not implemented for a given type, it is considered that the object is invalid as an index or as an index range. There were no such restrictions in the previous version and expressions involving non-index objects could possibly work but this was a source of confusion. Now the syntax$(subexpr)should be used to protect sub-expressions from being interpreted as a range expression.
The following changes only concern internal methods and types, they should not affect the end user:
-
Private aliases
EasyRanges.ContiguousRangeandEasyRanges.CartesianBox{N}have been suppressed. -
Internal methods
EasyRange.plus,EasyRange.plus, etc. no longer attempt to yield ranges with a positive step. This simplifies the implementation and is not necessary since the final processing pass by the public macros@rangeand@reverse_rangeconsists in callingEasyRange.forwardorEasyRange.backwardwhich take care of the sign of the step. This also fixes bugs in the stretching and shrinking (±and∓) operators. -
Internal method
EasyRange.to_intis no longer used and has been suppressed. It is superseded byEasyRange.normalize. -
Internal method
EasyRange.to_typeis no longer used and has been suppressed. It is superseded byTypeUtils.asand, to some extend, byEasyRange.normalize. -
Internal methods
EasyRange.first_lastandEasyRange.first_step_lastare no longer used and have been suppressed.