News for hackers. Stuff that matters.
Re:Niklaus Wirth has died by kragen on Wednesday January 03, 2024 @09:34PM (#38862372)
there are a lot of design decisions that are pretty debatable, but the ones that seem clearly wrong to me are:

- indexing from 1 instead of 0;

- the absence of a nilness/nonexistence distinction (so misspelling a variable or .property silently gives the wrong answer instead of an exception);

- variables being global by default, rather than local by default or requiring an explicit declaration;

- printing tables by default (with %q for example) as identities rather than contents. (you could argue that this is a simplicity thing; lua 5.2 is under 15000 lines of code, which is pretty small for such a full-featured language, barely bigger than original-awk at 6200 lines of c and yacc plus 1500 lines of awk, and smaller than mawk at 16000 lines of c, 1100 lines of yacc, and 700 lines of awk. but a recursive table print function with a depth limit is about 25 lines of code.)

none of these are fatal flaws, but with the benefit of experience they all seem like clear mistakes

Re:Niklaus Wirth has died by protomolecule on Friday January 05, 2024 @04:51AM (#38877356)
Thanks!
Re:Niklaus Wirth has died by kragen on Friday January 05, 2024 @09:51PM (#38887889)
sure! what do you think?
Re:Niklaus Wirth has died by protomolecule on Saturday January 06, 2024 @04:06AM (#38889816)
I agree with all the points.

It's been long time since I last used lua and only positive memories remained :) I used it for adding scripting in the apps I worked on and the experience was very good -- sandboxed from the start, decent performance.

Perhaps having 0-based indexes would've been bad for our users but I don't think they used arrays at all.