Re:OMG, Java is so verbose, guys
by tedmiston on Tuesday December 13, 2016 @10:51AM
(#13167652)
But Java is objectively verbose. The amount of milliseconds it takes someone to type a semicolon is pretty irrelevant to the inelegance of the language itself and how it is used. Author seems to be going on a rant defending Java more than anything else IMO.
[ Parent
| on HN ]
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:
let foo = "Hello world"
let answer = 42
var isDone = false
if isDone {
print("Correct: \(answer)")
} else { print("Wrong answer!")
}
Re:OMG, Java is so verbose, guys
by reitanqild on Tuesday December 13, 2016 @11:19AM
(#13167905)
> But Java is objectively verbose.
So what?
> Author seems to be going on a rant defending Java more than anything else IMO.
Also known as "a breath of fresh air" :-)
Edit: on a more serious note I find Java to be completely worth it as long as I make simple webapps and do simple backend tasks (payment and messaging integration).