At my office, this has been an ongoing conflict between developers. Should we use
_this because of the following reasons.
this. But why should you repurpose something if you can get something new?
- I think, it's clearer to use _this as a reference to
thisbecause of its similarity. Therefor its more logical to see its the same.
selfis a complete different word, and therefore should only be used for something completely different.
- It's easier to just change your code to
thisthen making it self. Yes, I'm a lazy developer.
Some references which agree with me:
- AirBnb AirBnb discussion on github