HiddenLayer555@lemmy.ml to Programming Humor@lemmy.worldEnglish · 6 months agoWhy make it complicated?lemmy.mlimagemessage-square12linkfedilinkarrow-up130arrow-down13file-textcross-posted to: [email protected]
arrow-up127arrow-down1imageWhy make it complicated?lemmy.mlHiddenLayer555@lemmy.ml to Programming Humor@lemmy.worldEnglish · 6 months agomessage-square12linkfedilinkfile-textcross-posted to: [email protected]
minus-squaremacniel@feddit.orglinkfedilinkEnglisharrow-up3·6 months agoKotlin 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).
minus-squarebranch@lemmy.worldlinkfedilinkEnglisharrow-up1·6 months agoSo a var can start as a string and later be an integer?
minus-squaremacniel@feddit.orglinkfedilinkEnglisharrow-up2·6 months agoNo, the type is strict and fixed.
Kotlin knows mutable and immutable variables.
varindicate mutables andvalwould indicate immutables (comparable with thefinalmodifier in java andconstin JavaScript/TypeScript).So a var can start as a string and later be an integer?
No, the type is strict and fixed.
deleted by creator