3 ms·
> Lua will never be more popular without a proper standard library. How would you add a large standard library without compromising Lua’s main purpose - to be
by pansa2 6y ago
> Lua will never be more popular without a proper standard library.
How would you add a large standard library without compromising Lua’s main purpose - to be a lightweight, embeddable language?
- ebg13 6y agoIt would still be lightweight and embeddable with common sense pure Lua functionality like classes and major utility methods like string.startswith/string.endswith/string.trim/string.split/table.deepcopy. You don't have to integrate a multiprocessing web server for different operating systems. Instead you're left with bullshit community essays like http://lua-users.org/wiki/SplitJoin http://lua-users.org/wiki/SplitJoin which shows pages and pages of different user attempts for one extremely common function, many of which explicitly do not work! Lua has its strengths, but faffing about refusing to just standardize the right way to do things is super user-hostile.
- pull_my_finger 6y agoLua, by design, favors "mechanisms not policy"[1]. It's not a failing it meant to empower users. There are plenty of mature utility libraries that serve for batteries if you like that. [1] - http://lua-users.org/wiki/MechanismNotPolicy http://lua-users.org/wiki/MechanismNotPolicy
- ebg13 6y ago> It's not a failing it meant to empower users. Freedom to implement bespoke solutions is great if what you want to spend your time on is implementing bespoke solutions. Freedom from needing to implement bespoke solutions is better for everyone. Even non-programmers can understand what common simple operations are for and when they might be useful. Saying that one needs to know how to implement or find them as well, especially when a bunch of extremely learned participants in lua-users can repeatedly fail to implement working versions, is literally the opposite of empowering.
- pull_my_finger 6y agoThe examples you're listing, I don't use those very often at all. If I did it's much easier to just grab a lib, then to carry all my tools with me for every script. Even the libraries that are included can be cast aside if you want a slim build. Not every language does or should strive to cater to those looking for quick hacking or rapid prototyping. I like that Lua is slim and loads fast. I understand your perspective though.
- stjohnswarts 6y agohave a "smol-lua" that is a proper subset of the "hugely-lua" ? I really wish there were more good options for that for python.