On Thu, Oct 12, 2017 at 6:20 PM, Xiaodi Wu <xiaodi...@gmail.com> wrote:
> On Thu, Oct 12, 2017 at 2:47 PM, Jarod Long via swift-evolution < > swift-evolution@swift.org> wrote: > >> I don't really expect this sort of syntactic sugar to be popular enough >> to make it through swift-evolution, and I don't think it's worth the >> distraction from more important priorities at this time, but for what it's >> worth, I've enjoyed this feature in other languages that support it. It >> plays a small part in making code more focused by eliminating unnecessary >> syntax. >> >> I could be wrong, but I'm not so sure that this would actually be source >> breaking. Even if you have something like this: >> >> let points = [ >> Point( >> x: 1.0, >> y: 2.0 >> ), >> Point( >> x: 3.0, >> y: 4.0 >> ) >> ] >> >> Proper implementation of this feature wouldn't suddenly interpret >> `Point(` as its own element. >> > > There are those of us who respect the 80-character line and break > expressions across lines: > > let x = [ > NSVeryVeryVeryLongType > .veryVeryVeryLongProperty + > NSVeryVeryVeryLongType2 > .veryVeryVeryLongProperty2, > ] > > It would be a pleasant surprise if a grammar with optional commas can > avoid blowing up existing code; I'm quite doubtful. > > > An argument against optional commas,, or an indictment of overly verbose Foundation APIs… 🤔🤔🤔
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution