[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Has Lua reached perfection?
- From: KHMan <keinhong@...>
- Date: Sun, 28 Jan 2018 14:09:30 +0800
On 1/28/2018 10:04 AM, Paige DePol wrote:
On 1/28/2018 8:52 AM, Coda Highland wrote:
Perfection? No. I agree with what Peter said. When younger, I would help with this kind of cheerleading. Now, not so much. When younger, I was suitably impressed when reading about the beautiful conceptual elegance of Lisp. Now, not so much. Things change.
I want a switch construct! I want a switch construct! I want a switch construct!
I wrote one of those and it wound up being quite performant... of course
you probably mean you'd like it in vanilla Lua, but I can't help there! ;)
Yeah, I reckon we'll have to make more noise then. :-) Lemme get
some pots and pans...
These days I like "no surprises" and being able to clearly express
things in code. After all, Lua is not competing in the JIT
pedal-to-the-metal race, and neither is it going
super-linguistic-expressive as in Perl 5. I'm not so gung-ho on
"minimal" these days.
Switch constructs are almost ubiquitous. For many things, the
brain wants to construct code like a switch statement. Being able
to express an idea clearly as a switch construct is better than
shoehorning the thing into a mass of if-then statements, or worse.
For me, performance is now a secondary consideration.
How many other major languages that avoids having a switch
construct are there? Lua puts in a utf8 library but not a switch
Clear and unambiguous code is a good thing to have. We want to be
in control of our mass of code, and not the other way round.
(Slightly OT: This week, an Ariane 5 likely launched perfectly on
a wrong heading, flew almost over spectators at Kourou beach, and
mission control appeared to have minimal situational awareness.
Who wants to bet it's related to software engineering and
processes, like last November's Soyuz/Fregat failure? And how much
do you trust software driving your car today?)
So given a choice between "minimal is elegant" and "clear
expression of ideas", guess what I would choose.
The only restriction with the patch is the 'jumpto' command does not jump
to labels outside the current block, however, that is something I will be
fixing and posting an update for fairly soon.
Kein-Hong Man (esq.)