4 ms·
... and in the end you still have talk over TCP and deal with that leaky abstraction, or you accidentally write O(N^2) code that could be expressed easily in O(
by perlgeek 13y ago
... and in the end you still have talk over TCP and deal with that leaky abstraction, or you accidentally write O(N^2) code that could be expressed easily in O(N) (compare https://github.com/nominolo/HTTP/commit/b9bd0a08fa09c6403f91422e3b23f08d339612eb https://github.com/nominolo/HTTP/commit/b9bd0a08fa09c6403f91... for a recent HN submission) because the "taking away" approach at abstraction also abstracts out some important performance considerations.
- Peaker 13y agoThat's a bad example because this code does not use the Monoid abstraction, but rather the Buffer Operations abstraction which does expose performance costs.
- VladRussian2 13y ago>because the "taking away" approach at abstraction also abstracts out some important performance considerations. a software engineering abstraction which doesn't have clear performance facet is just a bad software engineering abstraction (while, for example, it may be a really good math abstraction).
- tel 13y agoTCP is done via the IO monad and this is an excellent example of what the IO monad is used for---it forces you to realize that there's another layer of (this time quite leaky) abstraction over your potentially simple inner abstraction.