What is everyone's thoughts on having something li...
# random
r
What is everyone's thoughts on having something like Swift's 'mutating' function modifier?
n
If you are talking about an extra keyword that would add unnecessary complexity to Kotlin. Would be much better to design and implement functions to be pure whenever it is appropriate to do so, which can be done in Kotlin.
Do think that the official Kotlin style guide's naming section needs to be expanded to cover naming functions in regards to mutation/purity.
r
Perhaps not a keyword, but a compiler enforced annotation like they did with many java keywords
@Mutating fun whatever()
Though that may start to get ugly
Ah, was just a passing thought
c
Let's learn from C++'painful
const
learnings and not make the same mistakes
2
r
Can't learn from something you've never used!
c
Yes you can. Books. People.
k
Google up c++ const...in the latest version of c++. It's pretty funny 😀
r
oh... oh my