3 ms·
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
by Zarel 10y ago
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.