3 ms·
I love the idea, and maybe this works well for them in a position of relatively lax performance. The truth is that all abstractions around data fetching are in
by SmooL 7y ago
I love the idea, and maybe this works well for them in a position of relatively lax performance.
The truth is that all abstractions around data fetching are inherently leaky; making an API call does _not_ have the same runtime characteristics as reading from a file. Different access patterns have different performance implications across different data sources.
I would love if somehow we could put runtime performance characteristics in the type systems. Implementing readFile<T extends Readable, S extends SomeRuntimeCharacteristic> would go a long way towards sealing those leaks.
- adamkl 7y agoIt’s all about the right tool for the job. I always push this approach when developing applications, but I work in large enterprise where performance often isn’t critical, but applications can live on for _decades_. Should you use this approach when developing something like nginx? Probably not. But if you are developing a line-of-business application that has to interact with an ever-evolving mish-mash of other systems over an embarrassingly long time frame, it’s a great approach.