News for hackers. Stuff that matters.
Re:Learn Kotlin in Y Minutes by wapz on Thursday May 18, 2017 @09:50PM (#14372494)
I'm guessing the parent is just complaining that if you are reading code very fast (particularly if you're browsing repositories on your phone) it is hard to distinguish between "val" and "var."
Re:Learn Kotlin in Y Minutes by h1d on Thursday May 18, 2017 @10:28PM (#14372631)
Let alone type them wrong on a tired night.
Re:Learn Kotlin in Y Minutes by thomastjeffery on Thursday May 18, 2017 @11:09PM (#14372760)
Thankfully that would be a simple compile-time error. The message might even be readable.
Re:Learn Kotlin in Y Minutes by darklajid on Thursday May 18, 2017 @11:31PM (#14372832)
If you type var and mean val - would there be any error?

(I'm sure that this is just something you need to get used to, I'm merely trying to point out that this could be a silent typo/mistake)

Re:Learn Kotlin in Y Minutes by jpliska on Friday May 19, 2017 @12:43AM (#14373082)
In many cases, you would get warnings when accessing a var that you don't get when accessing a val. Also, IntelliJ suggests converting to val if a var is never reassigned.
Re:Learn Kotlin in Y Minutes by dullgiulio on Friday May 19, 2017 @04:20AM (#14373755)
As others said, not a problem if you are using an IDE (and a specific one.)

Considering who authored the language, I am not surprised at all.

Re:Learn Kotlin in Y Minutes by Larrikin on Friday May 19, 2017 @12:11AM (#14372960)
In actuality it will be extremely obvious in the IDE and the developer would not make this error.
Re:Learn Kotlin in Y Minutes by thomastjeffery on Friday May 19, 2017 @12:22AM (#14373011)
if "val" is a constant, and you try to mutate it later, the compiler will tell you, "That ain't gonna happen."
Re:Learn Kotlin in Y Minutes by dnautics on Friday May 19, 2017 @03:15AM (#14373561)
It's even worse when your primary keyboard is Dvorak!