I'm used to representing members with a _ at the end of their name, something like this.message_. I'm also used writing c++ which does not require the use of this to access members. So I have some biases that don't necessarily fit with the normal conventions or language JavaScript 🤷♂️.
And you're right there is some nuance for value types and reference types. I'm updating the post now to clarify them!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I've considered this myself. It can definitely make code feel more readable but there are a couple of drawbacks:
this.myVar = newValue
I'm used to representing members with a
_
at the end of their name, something likethis.message_
. I'm also used writing c++ which does not require the use ofthis
to access members. So I have some biases that don't necessarily fit with the normal conventions or language JavaScript 🤷♂️.And you're right there is some nuance for value types and reference types. I'm updating the post now to clarify them!