lua-users home
lua-l archive

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


On 12 Sep 2018, at 8:28 am, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> 
> Op Wo., 1 Aug. 2018 om 00:16 het Dibyendu Majumdar
> <mobile@majumdar.org.uk> geskryf:
>> 
>> Are there features in Lua that could be removed to create a simpler language?
> 
> We've had a lot of fun playing that game, let's get serious. Let's do it.
> 
> It's as easy as just not using the features that we would remove. Try
> coding that way for say a week. You will find that some things are not
> really missed, others you simply can't keep yourself from using no
> matter how hard you try to avoid them.
> 
> I'm looking forward to trying to use "repeat ... until" as my only
> looping and local blocking construct :-)
> 

It struct me today that "dofile" must be the only function in the standard library that is entirely implementable using other stuff in the standard library, and as such is something of an oddity given there is very little redundancy and "more than one way to do it" anywhere else.

(I suppose "assert" is in that category too, but it's too useful as the inverse to pcall to want to remove).

Unfortunately most of my Lua work at the moment is in an established largeish codebase, and writing clear legible code that adheres to the coding standards of the project is much more important than attempting any experimentation :-) I like the idea though!

Cheers,

Tom