[swift-evolution] Beyond Typewriter-Styled Code in Swift, Adoption of Symbols

David Sweeris davesweeris at mac.com
Tue Aug 29 20:48:30 CDT 2017

On Aug 28, 2017, at 7:57 PM, John Pratt via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:

> I sent a postal envelope to the Swift team with an article I wrote, arguing that
> symbols and graphics would push the programming language forward.
> Wouldn’t it be nice to have an actual multiplication matrix broken out into code,
> instead of typing, “matrix()”?  It seems to me Swift has the chance to do that.
> Also: why does "<==" still reside in code as "less than or equal to” when
> there is a unicode equivalent that looks neat?  
> Why can’t the square of x have a superscript of 2 instead of having “pow(x,2)?  
> I think this would make programming much easier to deal with.
> I expound on this issue in my article:
> http://www.noctivagous.com/nct_graphics_symbols_prglngs_draft2-3-12.pdf <http://www.noctivagous.com/nct_graphics_symbols_prglngs_draft2-3-12.pdf>
> Thank you for reading.

I whole-heartedly agree with the sentiment, but I think you're approaching this from the wrong direction... Unicode isn't used much because there's no simple, easy, and universal way to input unicode characters. Personally, I use a custom keyboard layout with tons of stuff mapped to ctrl- and alt-keys, but that breaks things like, say, Terminal.app, because ctrl-d prints ∂ instead of sending the control character (so I switch back to a keyboard layout without the control keys mapped, which is annoying). We need to solve the general unicode input problem before we can start seriously pushing for its use to be required, and that's far outside of Swift's scope.

As far as formatting matrices "correctly" (and I also wish they could be displayed the way you demonstrated in your write-up), I think that'd be more a feature of some sort of custom display layer in Xcode than of macOS's or Linux's text system. Maybe it'd fit in with some other OS's type system, but "typewriter text" is too ingrained into the text systems of Windows, macOS, and Linux (and every other OS I can think of) for "pretty print" matrices to work across all text-based applications (which is what I think it'd take to catch on).

- Dave Sweeris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170829/cc1ff2ff/attachment.html>

More information about the swift-evolution mailing list