[swift-evolution] Allow ' in variable/constant names?

Rob Mayoff mayoff at dqd.com
Wed Jan 11 12:21:59 CST 2017


It's not as easy to type, but you can already use U+02B9 MODIFIER LETTER
PRIME for this purpose. Swift accepts this:

let x = 1
let xʹ = x + 1
let xʹʹ = xʹ + 1
let xʹʹʹ = xʹʹ + 1


On Wed, Jan 11, 2017 at 7:08 AM, Tuur Anton via swift-evolution <
swift-evolution at swift.org> wrote:

> I often have related variables. Would be nice to just add ' like I can in
> Haskell:
>
> let foo  = "asdf"
> let foo' = "asdf2"
>
> What do you think?
>
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170111/ad09b79c/attachment.html>


More information about the swift-evolution mailing list