[swift-evolution] [Discussion] stride behavior and a little bit of a call-back to digital numbers

Erica Sadun erica at ericasadun.com
Sat Feb 27 18:20:02 CST 2016


> On Feb 27, 2016, at 4:59 PM, Joseph Lord <joseph at human-friendly.com> wrote:
> 
> If this happened how would legacy code be handled and a migratory written. I'm really nervous about small changes to semantics causing bugs. Would be more comfortable if the 'through' argument was renamed to force people to reconsider and check their code. It shouldn't have a migratory and the error on calling the old through variant should produce a very informative warning describing the semantic change.


Impact on Existing Code

If this change were adopted, it could affect legacy code semantics written under current behaviors and assumptions. A migrator would not easily identify in-place workarounds like the through: 2.01 epsilon adjustment. I'd recommend adding "FIXME:" notes wherever through: is found to warn against continued use without a full inspection, offering links to information about the semantic changes.

Although renaming the through argument is another valid approach, renaming works against the proposed point that adapting through semantics better match what "through" actually means.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160227/7a2e50fc/attachment.html>


More information about the swift-evolution mailing list