lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 19/01/2020 01:47, Sean Conner wrote:
It was thus said that the Great Lorenzo Donati once stated:

[snip]

Yes, pretty much.  It's popular, so I must learn it.  Who uses Lua?
Why bother with Lua when that limits my job prospects.

On the other hand, going with Python (or any other hip new popular
language like Go) you are now competing against scores of other
programmers who know just as much as you do.  The Lua jobs might be
few and far between, but I stand a better chance of landing them that
a Python programmer.

But who thinks like that?



Please, consider the fact that my original post was made because Lua
team once said they wanted Lua to become more popular. Whereas the hard data show it is not going that way. Otherwise what I said seems a series of objections against Lua in itself, which are not.

Some years ago I remember someone linked to a similar SO survey and Lua was among the top three scripting languages together with Javascript and Python. Now it's not even on the radar!



Ask yourself: would you (a company) prefer a Python solution that
is bloated and slow, but still "fast enough", well supported
(because "everyone" know Python) and that is created in 10 days, or
an equivalent Lua solution that takes 2 month to be created and
that cannot be supported long term because you don't even know
where to find an alternative Lua dev in your area would the need
arise? Not to mention the level of support of libraries.

It's funny you mention that.  I used Lua for a few projects at work
(one is very imporant (such that it's the front end to the actual
product that generates *all* our profit at the company) and yet, I'm
only one of two programmers there that know Lua.  Our QA engineer
keeps using Python for running tests because he finds it easier to
use than Lua (despite the fact that most of our testing tools I've
written were in Lua when I was in the QA department).

Changes to my part of the codebase usually take on the order of
hours, not days or even a few weeks like some other parts (written in
C and C++).  I mainly attribute that to Lua's coroutines, since the
main logic of the program (which is event driven using select() [2])
looks more like imperative code than chopped up callback hell or
asynchronous promises or whatever the new hotness is in nodejs these
days.

Also, back in late 2018, a new project was announced.  I (by myself,
on my own) managed to write 90% of the code base in Lua in two days
(the last bit wasn't done because of some still open questions).  The
other team that actually started writing the code took the better
part of a year (I think---I'm not entirely sure they're done yet) to
write the program.  But hey, I program in Lua, what so I know?


Yes, from your POV you are HUGELY productive with Lua (and that's why I'm /not/ bashing on the language - heck! I LOVE it). But from a management POV you are (seriously) a potential liability: if you decided to leave the company they would be seriously sc***d up, unless there were a ton of expert Lua programmers around ready to jump on board to keep care of the code you wrote. (BTW: how much of your Lua coding requires interfacing with C through Lua C API?).

Moreover, ask yourself if a company wanted /now/ to invest in a new language, would they choose Lua (even if (a) they needed something where Lua shines and (b) they knew about Lua altogether)?

Of course if you already have a huge codebase in Lua with good senior programmer/s/ (note the plural), you would think thrice before making a switch.

But still, if a technology is going to be obsoleted [1] by market forces, that's an important factor in management decisions (remember those firms stuck to maintain huge COBOL codebases in critical systems that paid big bucks for the few greybeards that still knew it?!?).

A good technical manager should be able to see that a technology is going the way of the dodo and plan for its timely replacement.

I'm not saying Lua is obsolete because it is bad, but market forces have (almost) nothing to do with what is good or bad (sadly). If a product is badly marketed there is no hope it would be able to compete (especially on a large global scale).

It either survives in a niche or it dies off.

The world has seen a lot of extremely good products (HW and SW) that went down the kitchen sink despite their technical merits because of bad marketing moves. And hype, for good or bad, is part of the market forces.

And being open source doesn't make Lua immune to market forces, it just keeps one of the factor (licensing fees) out of the equation.

Again, Lua is better at some things, but that doesn't make it a
"good" general purpose PL (and being Turing complete doesn't count
in practice) if people don't /use/ it as a GP-PL.

And, btw, this huge user base means that Python use is growing even
in areas where Lua definitely shine: embedding. I find more and
more projects that use Python as embedded language. I can't say how
difficult is to embed Python, but I'm sure that if the demand
grows, someone in the Python community will find a way to make it
simpler.

And here I thought that Python was shedding users to Go, because of
similar easy of use plus it runs faster (and is just as opinionated,
if more so, than Python).


Python has a huge advantage wrt. other competitors: it appeals to non-programmers. Go aimed at being a new system language, maybe replacing C in some areas. They were targeting professional devs.

Python has become the go-to language for many professionals /who are not SW professionals/ (Sci-py anyone?). And they make up a big part of Python community.

Ask yourself which language would you use if you weren't an expert programmer with a problem at hand that required some serious programming that didn't require hiring a professional dev.
"Hey everyone is talking about Python. Let's try it!"


I really think Lua Team should reconsider some of their positions
on the development model of Lua, otherwise they risk a slow descent
into irrelevance in the PL landscape in a couple of years (except
maybe some very limited niches).

They might not even care.


Well, that's the feeling I got in latest years. But in this case it would be nice for the community to know their new stance.

If they no longer want Lua to compete on par among the GP scripting languages, but they want Lua to become a niche language or a simple research project for their academic purposes, that's perfectly OK, but the community should be made aware of that. [*]

Because otherwise (i.e., they want to compete on that field), and that's what I'm arguing about, they have been making the wrong moves, IMHO.


-spc (Never been one to use the popular stuff ... )

[1]	https://blog.osteele.com/2004/11/ides

[2]	Well, poll() actually on the production server, epoll() on Linux
and kqueue() on Mac, but the later two are mostly test platforms.



Cheers!

-- Lorenzo


[*] BTW, although I appreciated some new features in the evolution of Lua from Lua 5.1 to Lua 5.3 (e.g. goto, operators). I really didn't understand some decisions: string.pack/unpack, half baked utf8 library?

These seems very specialized tools that would fit very well into an external library in the current Lua philosophy. Yet they were included in the standard library. Why? Who knows!

And the new features of Lua 5.4 ... well I'm a bit perplexed. Some mechanism to handle RAII more deterministically is very useful, but the syntax complications seems a bit ugly to me. But I didn't try it, so it's just a gut feeling.