4 ms·
>Good: Portable: builds on any platform with an ANSI C compiler. >Bad: No POSIX functions built-in. This is an either/or thing. You cannot implement those fu
by copx 13y ago
>Good: Portable: builds on any platform with an ANSI C compiler.
>Bad: No POSIX functions built-in.
This is an either/or thing. You cannot implement those functions in portable ANSI C, it is platform-specific functionality. Also Lua is widely used on non-POSIX platforms (e.g. Windows) and given that the Lua developers have removed even most simple and basic functions like table.foreach in the past to keep the language minimal I don't see them ever adding those. Personally I like it this way.
- lvh 13y agoThere's a lot of great middle ground though; consider what Python does for many of those APIs :)
- Avshalom 13y agowell then you lose the smallness. That's also why the pattern matching isn't quite regexp and about half of 'the bad' adding features adds size.
- Arelius 13y agoAlso consider that Lua is widely used on many game consoles and embedded hardware, where even the basic functionality of many posix functions doesn't make sense.