I'm with isaac, personally I actually prefer re-declaring the "Foo.prototype.<whatever> =" each method it re-establishes context. Lots of coffeescript is bad this way since you get half-way down the file, you see some indented code and you have no clue what it's part of. Same goes for JavaScript using object-literals. This doesn't mean it has to be ugly, just dont write ugly code but I strongly agree there's no reason to use these classical OO thingies
On Nov 1, 4:44 pm, Brian Link <[email protected]> wrote: > I like the look of those functional mix-ins. Thanks for the link. > > > > > > > > On Wednesday, October 31, 2012 3:37:33 PM UTC-7, Fredrik O wrote: > > > Hi everyone, > > > I have just wrote a simple lightweight OOP helper and want your thoughts > > about it, the implementation "Class" is only 15 lines of code, but I have > > included some tests, to show how it works. Any feedback is welcome. I am no > > JavaScript expert, but if I have not done anything wrong should always the > > generated class be 100% compatible with normal JavaScript prototype > > inheritance and indeed be very fast. It allows a user write somewhat more > > simple code. > > > See gist: https://gist.github.com/3990372 > > > What are your thoughts? Both negative and positive. And please, one > > comment is better than no one, so please comment if you read through the > > gist. > > > Thanks in advance! -- 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
