Join Slack
when defining extension functions for a class (outside of the class definition), is it idiomatic to ...
# getting-started
y
y
01/18/2023, 1:52 PM
when defining extension functions for a class (outside of the class definition), is it idiomatic to use
this
? or should I omit it?
j
Johann Pardanaud
01/18/2023, 2:07 PM
I don’t see any issue in using
this
if you think it can bring clarity to your code. But it clear isn’t necessary
Johann Pardanaud
01/18/2023, 2:07 PM
in a more idiomatic way, I see
this
used only when necessary
🫡 1
👍 2
2
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by