[swift-evolution] Proposal: Make it easier to use unicode identifiers in Swift.

Wallacy wallacyf at gmail.com
Fri Jan 15 18:27:13 CST 2016


http://ericasadun.com/2016/01/13/a-few-thoughts-on-swift-symbologygist/

On Fri, Jan 15, 2016, 21:53 Amir Michail via swift-evolution <
swift-evolution at swift.org> wrote:

> On Jan 15, 2016, at 6:50 PM, Jordan Rose <jordan_rose at apple.com> wrote:
>
>
> On Jan 15, 2016, at 15:39, Amir Michail <a.michail at me.com> wrote:
>
>
> On Jan 15, 2016, at 6:37 PM, Jordan Rose <jordan_rose at apple.com> wrote:
>
> Hi, Amir. What benefit does this feature have for a Swift programmer? In
> my mind, it makes it harder to reason about what something does, because
> there may now be multiple names for the same variable.
>
> Jordan
>
>
> What’s the point of supporting unicode characters in identifiers if almost
> all of them are too hard to type?
>
> With this approach, you can use standard text to type them and have them
> converted to unicode every once in a while (e.g., on a commit).
>
>
> I think the primary reason to support Unicode in identifiers is because
> some programmers use non-English names. Using them for e.g. math
> terminology is a bonus, but I don't think that's a reason to have special
> support in the core language.
>
> Now, I could be convinced otherwise (cf. C++'s digraphs
> <https://en.wikipedia.org/wiki/Digraphs_and_trigraphs>), but I don't see
> why you wouldn't just name the APIs something convenient to begin with, or
> define a shortcut in your editor rather than in the language.
>
>
> Consider a linear algebra library that makes use of unicode throughout its
> API. Having to define the shortcuts yourself is less convenient than having
> them come with the library.
>
> Moreover, the IDE could even help you by showing you what you can type
> using standard characters to generate a particular unicode identifier as
> can be automatically determined via unicodealiases in the library source.
>
> Best,
> Jordan
>
> P.S. As a general note, please include in the first message for a feature
> *why* you think a particular feature is a good idea for Swift. That saves
> a bit of time for those of us who may not immediately see the benefit.
>
> _______________________________________________
> 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/20160116/183c49a4/attachment.html>


More information about the swift-evolution mailing list