3 ms·
> why can't it be used? It's not Lua. This is not a thread about things missing from C. It's a thread about things missing from Lua. Suggesting to just use an
by ebg13 6y ago
> why can't it be used?
It's not Lua. This is not a thread about things missing from C. It's a thread about things missing from Lua. Suggesting to just use an entirely different language is bizarrely mishandling the issue.
I feel like the question is humorously akin to asking why a plain text reader can't portray a jpeg. It can, of course, if you write a description of the jpeg in a text file. Naturally, I should have been more clear.
> Not allowed to use modules written in C? Or lack a C compiler?
Often. The moment you start writing things like plugins for lay people, you stop being able to say "you should just grab a compiler".
> And isn't the saying in the Python community "the standard library is where modules go to die"?
People say dumb things all the time. We shouldn't begrudge them.
.
[edit] HN doesn't want to let me reply to your reply. I guess it doesn't like conversations. :(
> But doesn't Python also support modules written in C?
Whether a language _allows_ you to implement libraries in other languages is orthogonal to whether it should have standard implementations of basic things that are both extremely common and also often nontrivial to implement correctly and performantly for the person who needs the functionality right now.
> Or is it because the standard Python library is so large that it's not needed as often?
The Python standard library being so complete is probably the biggest reason why people love Python. Also, Python libraries get written in C exclusively for performance in cases where performance is paramount because Python is rather slow and frivolous with RAM. It's only done for things that are computationally intense (numpy, pytorch, etc). If Python were as fast as LuaJIT, nobody would write any Python libraries in C (excluding thin interfaces).
- spc476 6y agoBut doesn't Python also support modules written in C? Does Python get a pass for that? Or is it because the standard Python library is so large that it's not needed as often?
- fit2rule 6y ago>It's not Lua. I think that's a big part of the problem - the perception of Lua as a language, and not as an execution/runtime environment that happens to have a scripting language at its core. I get your point thought - it is frustrating to have to find these things to glom into a Lua project - but on the other hand, this is a language you can embed in anything, so tacking a standard library - which may not be useful in the "anything" application - is counterproductive to the goals of Lua, which is to be a simple and easy language to embed into anything.