News for hackers. Stuff that matters.
Re:Replacing ‘that = this’ assignments in JavaScript with Ar... by Zarel on Friday April 14, 2017 @04:48PM (#14117225)
I used to do that pattern just because it was the one I found when googling how to make classes in JavaScript back in 2011. It worked until I hit scaling issues and the inefficiency of it all caught up with me, and I had to learn the prototype pattern.

Personally, I think sticking to one pattern makes more sense than having to switch patterns and deal with the inconsistency of that depending on your performance use-case. I personally think the prototype pattern is nicer, too.

There are no comments on this comment yet.