Nº 2 - Ditch the semicolon

Every time you use a semicolon (;) in swift, a tree dies 🙄. Don’t roll your eyes! It’s true.

Don’t use them, they are a thing of the past. They make your code look ugly and nasty.

Look how ugly:

1
2
let lukeSkywalker = JediKnight();
lukeSkywalker.savePrincessLeia();

Now look how beautiful:

1
2
let lukeSkywalker = JediKnight()
lukeSkywalker.savePrincessLeia()

Nice, clean, perfect 😌.

Compartir Comentarios