Chills
01/07/2021, 6:42 AMTimo Gruen
01/07/2021, 8:03 AMChills
01/07/2021, 9:45 AMImmutability has nothing to do with efficiencyIs val and var are compiler specific tor runtime specific?
Timo Gruen
01/07/2021, 9:48 AMvar
and only a Getter for val
.
So in both cases you are having - more or less the same object, but in one occasion only with a getter, in the other with getter and setter.
But generally speaking - if you are bothering with performance issues from programming language perspective, you should checkout your algorithms, it’s more likely that they are the bottleneck and not the language. (Surely depending on your field or business)Chills
01/07/2021, 9:53 AMTimo Gruen
01/07/2021, 9:54 AMChills
01/07/2021, 9:59 AM{1,2,3...N}
Timo Gruen
01/07/2021, 10:02 AM