[swift-users] Request advice on closed range operator

Jens Alfke jens at mooseyard.com
Sun Feb 14 12:54:19 CST 2016


> On Feb 14, 2016, at 9:37 AM, Peter van der Linden via swift-users <swift-users at swift.org> wrote:
> 
> I find it unusual that adding white space between two tokens can cause the compiler to emit an error message. 

This is by design. Swift is less lenient about whitespace than most C-derived languages. This helps the parser distinguish where operators begin and end, which allows programs to define arbitrary custom operators.

—Jens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160214/d5f41892/attachment.html>


More information about the swift-users mailing list