3 ms·
I strongly tend to think the hard part is community, making a practice. I believe that we could optimize around the kind of practice spoken here- having flyweig
by rektide 10y ago
I strongly tend to think the hard part is community, making a practice. I believe that we could optimize around the kind of practice spoken here- having flyweight objects, with little depth to them, few captured functions- believe is possible and doable. It's a very mixin style architecture, but more about structures than what a lot of focus is- methods.
We are struggling to figuring out the answers to what you are challenging here- finding broad architecture, evident correctness, general maintainability, patterned readability- it's all hard. I tend to think the actual decisions factor in little though, that only at Facebook scale to mixins- particularly data-centric ones, rather than function centric ones- become hard to practice well, intra-organizationally.
And different patterns will have some different balance. But overall I think it's mostly exposure- the good, advantageous patterns need leadership and example for them. Most advantages are portable, but take practice to borrow. Having your flyweight have a length property on it is not going to be a serious barrier to any of these ideas- architecture, correctness, maintainability, reliability.
your side.
I really really like the ideas suggested in this article- use a flyweight context, don't capture functions, don't nest. It's fast, bleedingly fast JS, and many folks could emulate and practice this, and not complicate their lives, and spread a practice that is fast.