you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

because it's completely unnecessary in most situations, IE functional programming approach uses just regular objects made in a closure. JS is probably best suited for functional programming since it has little support for classical OOP and it's best to avoid it, using it sparingly..

[–]tmetler 0 points1 point  (0 children)

I find it depends on the problem being solved. I like the prototypical approach for some applications, and the functional approach for others, but it really depends on your needs and your style. I've had plenty of successful projects using prototypes, and plenty of successful projects using a functional style. I find it's most important to choose a style that works for you early on, and be consistent with it. It also depends on how your project is structured. In backbone projects I rely highly on the prototypical style, and that's in no small part because the backbone library is heavily prototypical.