3 ms·
A good example of "magic" that is 100% worthwhile is the MobX library (I may actually write a post on it soon). A few key things that make this the case: - It
by brundolf 7y ago
A good example of "magic" that is 100% worthwhile is the MobX library (I may actually write a post on it soon). A few key things that make this the case:
- It accomplishes something that would be dramatically messier and more error-prone in the host language without the use of magic
- It introduces a very small number of "magical" concepts, and their behavior WRT the outside world is very intuitive
- While every abstraction has leaks, the ones in MobX gravitate towards performance rather than correctness. I.e. it virtually always does what you expect, and usually does it efficiently.
- It provides trap-doors and hooks for dealing with every possible abstraction leak you might run into