Why make it complicated?
Why make it complicated?


Made with KolourPaint and screenshots from Kate (with the GitHub theme).
2 crossposts
Why make it complicated?
Made with KolourPaint and screenshots from Kate (with the GitHub theme).
You're viewing a single thread.
I see your TypeScript and raise you kotlin:
kotlin
var a: String
What’s up with that syntax? Why the use of var here?
Kotlin knows mutable and immutable variables. var
indicate mutables and val
would indicate immutables (comparable with the final
modifier in java and const
in JavaScript/TypeScript).
So a var can start as a string and later be an integer?
I don't know Kotlin but in other languages "(im)mutable" refers to the value, not the type.
No, the type is strict and fixed.