That would be good, I think because it would force everyone to be precise in regards to trailing whitespace. And I don't see that as a bad thing.
> On Apr 13, 2017, at 9:54 AM, Adrian Zubarev via swift-evolution > <[email protected]> wrote: > > I was really confused by your last reply. Actually I’ve got a better idea for > a fix-it. :-) > > let str_8 = """↵ > ····foo··········↵ > ····""" > warning: line # includes trailing space characters in multi-line string > literal > ····foo·········· > ~~~~~~~~~~ > Fix-it: Insert "\n\" (after these space characters) > The fix-it will inset \n\ after all your space characters, so the developer > is kinda forced to strip them manually to ····foo or let the IDE add \n\ if > he really needs that precision. > > That would work. :) > > > > > -- > Adrian Zubarev > Sent with Airmail > > Am 13. April 2017 um 15:46:52, John Holdsworth ([email protected] > <mailto:[email protected]>) schrieb: > >> \n\ >> would work >> >>> On 13 Apr 2017, at 14:44, John Holdsworth <[email protected] >>> <mailto:[email protected]>> wrote: >>> >>> >>> I’ve never understood how you mean "explicit backslash". backslash has >>> specific roles >>> and at the moment it is assigned to meaning standard escapes or "don’t >>> include this next >>> newline in the literal". I can’t see how it could be reassigned to mean >>> “include whitespace” >>> without loosing the option to concatenate lines. >>> >>> fix-its are beyond my pay grade so that’ll have to wait until Apple looks >>> at the implementation! >>> >>> >>>> On 13 Apr 2017, at 14:32, Adrian Zubarev <[email protected] >>>> <mailto:[email protected]>> wrote: >>>> >>>> A warning that will popup when you included any trailing spaces in a >>>> ‘content line’ without the explicit backslash could also provide a fix-it >>>> to the user to remove these spaces. However if you can emit that warning >>>> and calculate the spaces to remove, than the compiler should be able to >>>> swallow these characters by default right? >>>> >>>> >>> >> > > > _______________________________________________ > swift-evolution mailing list > [email protected] <mailto:[email protected]> > https://lists.swift.org/mailman/listinfo/swift-evolution > <https://lists.swift.org/mailman/listinfo/swift-evolution>
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
