Paul
The semicolon is actually needed still to avoid accidental multi-line
statements. E.g. these functions behave differently:
func doNothing1() {
break
print(“This text gets printed”)
}
func doNothing2() {
break;
print(“This text isn’t printed”)
}
Until odd cases like this can be avoided, I think semicolons are still (though
very rarely) necessary.
Chris
> On Mar 17, 2016, at 3:25 PM, Paul Ossenbruggen <[email protected]> wrote:
>
>
> +1 I think that let people do whatever they want if i makes them happy when
> it makes the code less readable is not a good idea. I support the notion that
> semicolon should not be allowed at end of line. It does nothing to help
> readability of the code. If it does nothing, it should go. Swift code should
> be easy to read, and in this case clarity wins. We have to break the
> semicolon habit :-)
>
>
> Perhaps providing a warning fix-it which removes them from the end of all
> lines in the file. I suspect most cases the only reason people put it there
> is habit or they are converting old code from another language.
>
>
> - Paul
>
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution