[swift-evolution] Allow ' in variable/constant names?
charlie at charliemonroe.net
Wed Jan 11 07:16:58 CST 2017
-1. Why? Why not use foo2 instead? Is ' so much better?
Instead, I'd personally love better character support in Swift in the future and allow a Character literals using ' - just like in C, except with Unicode support:
let myChar = 'x' // Character
let myChar2 = '∃' // Character
let myChar3 = '\0' // NUL Character
let myChar4 = 'xyz' // Error from compiler
> On Jan 11, 2017, at 2:08 PM, 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
More information about the swift-evolution