[swift-evolution] Beyond Typewriter-Styled Code in Swift, Adoption of Symbols
Chris Lattner
clattner at nondot.org
Tue Aug 29 00:28:05 CDT 2017
> On Aug 28, 2017, at 9:58 PM, John Pratt via swift-evolution <swift-evolution at swift.org> wrote:
>
> I think the editor would recognize that "<==“ was just
> typed and replace it with the unicode character ≤ immediately.
>
> Likewise, x^2 would be recognized and turned into x with 2 in superscript.
>
> As for how the UI would work for other types of symbols,
> there are all kinds of techniques for that. That is a UI issue,
> for a UI design team to address. XCode’s code completion is just one
> example of how UI can manage input issues.
There is no reason to change the language to enable this. Editors could do this automatically. Alternatively, you could just use a programming font with ligatures for operators, see e.g.:
https://medium.com/larsenwork-andreas-larsen/ligatures-coding-fonts-5375ab47ef8e <https://medium.com/larsenwork-andreas-larsen/ligatures-coding-fonts-5375ab47ef8e>
https://github.com/tonsky/FiraCode <https://github.com/tonsky/FiraCode>
https://www.hanselman.com/blog/MonospacedProgrammingFontsWithLigatures.aspx <https://www.hanselman.com/blog/MonospacedProgrammingFontsWithLigatures.aspx>
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170828/2a08fb0d/attachment.html>
More information about the swift-evolution
mailing list