3 ms·
Interesting. Can you show an example of how Lua's interface to the underlying platform improves on Python? Doesn't replacing APIs with protocols merely shift th
by akkartik 10y ago
Interesting. Can you show an example of how Lua's interface to the underlying platform improves on Python? Doesn't replacing APIs with protocols merely shift the breakage to higher-level logical errors rather than lower-level mechanical ones?
- sitkack 10y agoLua is under-coupled with the base system. For the longest time it wouldn't even support dynamically loaded modules because it wasn't portable. It wasn't part of C89. So when one uses Lua, it is up to the user to supply IO. This threading through the needle or hour-glass allows the users (embedder) to define how the scripts interact with the base system. This makes them more resilient over time, the interactions are better specified and highly mediated. Somewhat analogous to the library vs framework dichotomy. Libraries survive better than frameworks do.
- akkartik 10y agoFascinating! Seems to have some commonality with dependency injection, which is one of my interests (https://github.com/akkartik/mu#readme https://github.com/akkartik/mu#readme) Can you point me at any Lua docs where I can read more about overriding IO in Lua?