Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Are you using semi-colons in Swift?

  • Yes, semi-colons for life

    Votes: 3 15.0%
  • Nah, lose them like old baggage

    Votes: 17 85.0%

  • Total voters
    20

theSeb

macrumors 604
Original poster
Aug 10, 2010
7,466
1,893
none
I am curious what others are doing. I find old habits are hard to shake after a couple of decades of writing code and I keep adding the semi-colon after statements, even though I don't need to.

I feel that a semi-colon is the "completion" of yet another great line of code :D and it seems odd to me to not have one. I also think it makes code more readable because I don't expect semi-colons on conditional statements, loops and so forth.

What are others doing? Have you managed to lose the semi-colon like it's old baggage, or are you holding on?
 
I've been using Groovy a lot since 2010 and so I have gotten used to not having any semi-colons.
 
When you go to the continent do you use Euros or pounds sterling?

Semicolons are so twentieth century.
 
I haven't heard any arguments for using them (unlike with JavaScript) so no, I don't use them.

It saddens me that Swift has curly braces. It needs to ditch them, as Python and Boo have.
 
After having gone through couple Swift tutorials I felt weird going back to Objective-C. For first few lines I kept forgetting *asterix and semicolons. :/
 
I know you don;t need them but if you work with other languages requiring them and it doesn;t hurt to use them in Swift so I continue to use them. I also still use () for my conditions in IF statements. To me it is more readable to see them still then not;
 
No I don't use them. I spend a lot of time using Ruby as well so I am more used to not using semi-colons.

I forget to use semi-colons in Objective-C all of the time now, including the @ for strings.
 
When I started working with Python I though the lack of the ";" and "{" and "[", etc. made the language seem almost like a toy. That didn't last long as I quickly got used to how much more efficient and easier to read the code was. I haven't moved to Swift yet (although I have been studying it) but I won't miss the million and half square brackets when I do that is for sure. I won't miss the semicolon either....
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.