Re:OMG, Java is so verbose, guys
by melling on Tuesday December 13, 2016 @10:58AM
(#13167719)
He covers type inference too, which is much more painful not having:
Animal animal = new Animal();
val animal = Animal();
Swift also doesn't need the semicolons. You can also omit the () in if and switch statements. It all adds up to a lot unnecessary noise. The immutability of let is really nice too.
let animal = Animal()
In Swift I don't bother adding the type for Strings, Bools or Ints:
Animal animal = new Animal();
val animal = Animal();
Swift also doesn't need the semicolons. You can also omit the () in if and switch statements. It all adds up to a lot unnecessary noise. The immutability of let is really nice too.
let animal = Animal()
In Swift I don't bother adding the type for Strings, Bools or Ints:
let foo = "Hello world"
let answer = 42
var isDone = false
if isDone {
} else {