Swift and semi-colons - are you using them

Discussion in 'iOS Programming' started by theSeb, Nov 16, 2014.


Are you using semi-colons in Swift?

  1. Yes, semi-colons for life

    3 vote(s)
  2. Nah, lose them like old baggage

    17 vote(s)
  1. theSeb macrumors 604


    Aug 10, 2010
    Poole, England
    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?
  2. Sean7512 macrumors 6502a

    Jun 8, 2005
    I've been using Groovy a lot since 2010 and so I have gotten used to not having any semi-colons.
  3. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    When you go to the continent do you use Euros or pounds sterling?

    Semicolons are so twentieth century.
  4. ArtOfWarfare macrumors G3


    Nov 26, 2007
    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.
  5. Ritmo macrumors member


    Mar 27, 2009
    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. :/
  6. larswik macrumors 68000

    Sep 8, 2006
    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;
  7. kyussmondo macrumors member

    Apr 7, 2010
    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.
  8. AppSwage macrumors newbie

    Jan 18, 2015
    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....

Share This Page