[swift-evolution] "bad smells" should be compiler errors with suggestions on how to fix them

Adrian Kashivskyy adrian.kashivskyy at me.com
Sat Dec 5 17:42:36 CST 2015


How would you do code review then? ;)

Regards,
Adrian Kashivskyy
iOS Developer at Netguru

> Wiadomość napisana przez Brent Royal-Gordon <brent at architechies.com> w dniu 05.12.2015, o godz. 22:10:
> 
>>>> SwiftLint looks really nice, but one thing I'd really like is automatic formatting.
>>> 
>>> That's a feature of IDE, not the language itself.
>> 
>> Not necessarily. The existence of "go fmt" has resulted in teams running it as a pre-commit translation and as a way of standardising across all users, regardless of IDEs. Otherwise you end up with multiple IDEs (like Eclipse and IntelliJ) which do formatting slightly differently and lead to all manner of pointless arguments. 
>> 
>> Letting "the IDE" do formatting is fine provided there is a maximum of one IDE. 
> 
> This is perhaps out of scope for this group, but I’ve actually long wanted languages to move in a direction where indentation is not present at all in the source file—your git repo might never have an instance of /\n[ \t]/ in it. Instead, it’s automatically added by the IDE while displaying the code, based on the block beginnings and endings present in the actual source. This would make incorrectly indented code a thing of the past; it would also be obvious when you’re missing a curly bracket, because your code would be indented all wrong. And it would end the destructive whitespace wars, because everyone could just set their IDE to do whatever they liked best.
> 
> -- 
> Brent Royal-Gordon
> Architechies
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151206/869e05fb/attachment.html>


More information about the swift-evolution mailing list