[swift-evolution] Brace syntax
Andrey Tarantsov
andrey at tarantsov.com
Sun Dec 20 05:59:26 CST 2015
> I don't know many people who have experienced a large variety (8+?) of programming languages and prefer Python's forced indentation
Count me as one. I'd prefer Swift to have Python-style indentation, just on the grounds of braces being stupid (why would you want to enter the same scope information twice)?
So +1 from me, although I don't suffer from the braces at all.
I do want to point out that the amount of code that fits on a screen is fairly important, and you should keep your methods short, so one less brace per method means a couple more methods per screen.
This would also free up braces to mean “closure” in 100% of cases, which is good for consistency.
But it would introduce it's share of problems for sure, so I don't feel strongly about this proposal.
I also admit that braces are generally preferred, for some mysterious reason that I hope a believer can articulate here. Take Sass, for example; it has both an indentation-based syntax and a braces-based syntax, and the latter one seems way more popular.
A.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151220/85061220/attachment.html>
More information about the swift-evolution
mailing list