2 ms·
^ Thanks for sharing that. I hadn't heard of Synapse but its the most unobtrusive data-binding lib I've seen so far. Very cool indeed! As far as implementation
by activestylus 14y ago
^ Thanks for sharing that. I hadn't heard of Synapse but its the most unobtrusive data-binding lib I've seen so far. Very cool indeed!
As far as implementation goes, it still feels "wrong" to me. I love syntactic sugar when possible, but forcing one paradigm on another without measurable benefit (aside from one's comfort/preference) just seems superfluous to me.
I would personally implement it using a modular FP pattern, you get constructors, private methods and all those juicy bits we love about OO, except we are in a completely functional state of mind.
http://answers.oreilly.com/topic/2177-how-to-use-the-module-pattern-in-javascript/ http://answers.oreilly.com/topic/2177-how-to-use-the-module-...
I'd much rather leverage the core strength of a language than try to force it to fit my own habits/patterns. That's just me though :)