3 ms·
> I mean, the only difference before the two is whether you have to put a comma between elements or not. Personally, I vastly prefer minimizing punctuation in
by ogre_codes 7y ago
> I mean, the only difference before the two is whether you have to put a comma between elements or not.
Personally, I vastly prefer minimizing punctuation in code. Most punctuation like this only lends itself to creating places where additional errors and bugs can creep in. Listing elements on separate lines gives you the separation needed so it's clear it's a list of things, the comma at the end of the line is needless.
> All because someone in charge of API design was afraid of lists and had more power than someone in charge of Swift language.
I suspect the people in charge of designing the Swift language have a similar aversion to needless punctuation in the language. They made a point of calling out the lack of a semi-colon in the original Swift launch announcement. This isn't some API designer pushing the issue, it's part of the philosophy of the language.