[swift-evolution] Beyond Typewriter-Styled Code in Swift, Adoption of Symbols
rltbennett at icloud.com
Thu Aug 31 18:49:37 CDT 2017
Funny, of all the debates that have taken place on this list, the one that brings out the incivility is about editors... yet another way vim and emacs prove their relevance 😏
Seriously though, is there any reason that *all* of these suggestions can’t be left to the editor? Put another way: is the real desire here nicely formatted code in a file, or *nicely formatted code displayed on your screen*? I think the general opposition is to changing the language to accommodate these features; it doesn’t seem like anyone is opposed to the features per se. Let your editor display <= as the less-than-or-equal symbol (can’t type as I’m on mobile) and convert a typed LToE symbol to <= in the file. Let your editor display x.intersect(y) as x \cap y and convert x \cap y to x.intersect(y) in the file. Etc etc. If the mathematical matrix becomes a significant part of the language, I suppose #matrix((row1 entries) (row2 entries) ... (rowN entries)) would be fine as well. But for ease of input and display across all computers and editors, the underlying code should remain easy to type on a typewriter.
> On Aug 31, 2017, at 7:14 PM, Dave DeLong via swift-evolution <swift-evolution at swift.org> wrote:
> I’m sorry, I don’t really understand the point you’re trying to make. Swift is open source. Anyone is free to make a Swift editor or integrate Swift support in to non-Apple IDEs, and then support additional features in their IDEs to make a custom-tailored Swift experience.
> I also think you forgot to turn off your caps lock.
>> On Aug 31, 2017, at 4:33 PM, John Pratt <jprattx at gmail.com> wrote:
>> OK BUT WHEN YOU CHANGE THE LANGUAGE YOU MIGHT ALSO CHANGE THE EDITOR.
>> WE AREN'T TO BE HELD HOSTAGE BY APPLE'S INTELLECTUAL PROPERTY OBSESSIONS
>> AND GREED.
>>> On Thu, Aug 31, 2017 at 5:17 PM, Dave DeLong <delong at apple.com> wrote:
>>>>> On Aug 31, 2017, at 3:58 PM, David Sweeris <davesweeris at mac.com> wrote:
>>>>> On Aug 31, 2017, at 2:51 PM, Dave DeLong via swift-evolution <swift-evolution at swift.org> wrote:
>>>>> Just a side observation…
>>>>> One of the downsides I would put forward to notation like this is it massively increases the barrier to entry for anyone else. I look at that “Reduction.agda” file and wonder if I need to go back to school for a degree in Math just to understand what’s going on.
>>>>> On the other hand, while using inefficient matrix notation may be more verbose, it is consistent with the other notation used in programming, which means it is more easily understandable for new-comers to the code.
>>>> New-comers from where? I've met more than one mathematician or physicist who claims they can't code because the syntax isn't what they're used to. People with different backgrounds can and do have vastly different ideas about what constitutes an intuitive syntax for any given semantic (which why I disagree with the notion that having more than one spelling for stuff is inherently bad).
>>> That’s a fair point, which IMO reinforces the notion that changes like this should be an editor-level feature, and not a code-level feature.
>>> An editor can reformat code (using a font with bazillions of ligatures or whatever) in was that you wouldn’t want to necessarily “hard code”.
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution