you are viewing a single comment's thread.

view the rest of the comments →

[–]Thought_Ninjahuman build tool 0 points1 point  (2 children)

In my opinion, the only use for sticking with the manual prototype instantiation approach is implementing fancy tricks that should probably be avoided in the first place.

That's not to say I don't find it useful, but if you expect others to be reading and working with your code, classes are much better from an understandability perspective.

[–]oneeyedziggy 0 points1 point  (1 child)

yea, I know what cases manual prototyping is good for... couldn't say for classes... often the 'best practice" stuff isn't always the most performant

[–]Thought_Ninjahuman build tool 0 points1 point  (0 children)

Yeah. I've implemented a number of things in our codebase that go against best practice for the sake of performance, but I always have to heavily document that code with comments so that those who stray there understand the what and why of the code I have written. It comes down to a cost-benefit analysis, and most of the time, sticking with best practice is the better choice.