3 ms·
> The package ecosystem is growing That is a nice euphemism. The lack of something even remotely resembling a standard library is what keeps me from using lua
by zeotroph 8y ago
> The package ecosystem is growing
That is a nice euphemism. The lack of something even remotely resembling a standard library is what keeps me from using lua more than I absolutely have to.
Because more complex constructs can be created so easily in Lua everybody is happily copy/pasting half baked stuff from the web. That means there is no common style which might make it consistent across code bases so Lua remains a "Bring Your Own" language. No proper arrays, no easy exceptions, no easily recognizable classes ("but it is so easy with setmetatable etc."), iterators, prettyprint...
Plus the various annoyances, such as nil access not being an error, no += (I read all the reasons against it), weird "false" concept, that tables are - if you look closely - neither arrays nor dictionaries, the "require" imports are not modules but more akin #include.
In my opinion Lua 6 should drop some historic weirdness (~=!) and make the core language more in line with JS or Python and provide a standard library - even if components there sacrifice some of the holy performance.
- ufo 8y agoI dont understand what you mean by comparing require with include. Lua's require only loads each module once, and doesn't introduce any new variables to the local scope.
- wruza 8y agoLuvit is node-copied environment, which nils “no library” downside. Lua doesn’t push it, but it is there and even works. As of no classes or ‘weird’ parts, js has more rich history of bullshit included, not included or misbehaved than any language ever. I’m not going to enumerate these here. You just get used to it and now can’t stand it in others. Js prototyping is much dumber though, so it could be hacked by 5-minute newbies easily, unlike mt/index magic. But there is no such thing like ‘being in line’ with javascript, since it draws no line. You can write a parser that makes Lua js-like (or even better) in a couple of hours, but that woudn’t make it popular. Including it into a browser would though. But browsers still resist to include anything viable like RxRS scheme-likes at least that could be transpilation target, repeating that unsmart ‘maintaining complexity’ argument. You’re stuck with js and that’s why rants go all the way. If it had enough concepts, there would be less rants and more transpilers, but it is dumb af and oriented on end-developers rather than on library, system or metadevelopers. At least wasm is a hope, but it was not seen seriously yet in this regard. Ps. require() is a regular one-time module-load routine, nothing to do with #include.