Thanks for answer, everyone, it is pleasant :-) To just clear my point. I understand why raw JavaScript inheritance often is preferred, no need to know what "Class" does for example. Simply speaking can every single JavaScript programmer see what is going on. But now to my point.
Say I am writing many small modules. Those modules should only export some function who gives some type of functionality. The user of those modules only care about the functionality and how it behaves, not how it is actually implemented. Say now it takes somewhat shorter time when I use a helper function than it would without it, why should I not use then? The "dependency" is included in the source, so every developer can fast and easily check it up. The generated function will have the same performance as the handwritten function probably and it will increase the readability of the source code somewhat. The function helper itself does not use any advanced JavaScript, all serious developers should understand it and no fancy stuff is added. So why is it not preferred to use a helper function in those situations? I cannot really get it when those advantages is applied. Den fredagen den 2:e november 2012 kl. 09:07:47 UTC+1 skrev Wil Moore: > > I agree with Isaac, > > Build classical function helpers as a learning experience, which which > will show you that you don't need them. > > Read and write a lot of idiomatic JavaScript and you'll quickly get over > (and actually start to like) the syntax of "Constructor.prototype.*". I > personally fought this for much longer than necessary. Once you get over > it, hundred-line object literals (including the popular "module" pattern) > will start to look extremely obtuse and superfluous. > > Either way, JavaScript is really fun so go write cool things and enjoy it > :) > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
