[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Thought experiment: what would you remove from Lua
- From: Dibyendu Majumdar <mobile@...>
- Date: Wed, 1 Aug 2018 19:12:25 +0100
On 1 August 2018 at 00:10, Coda Highland <firstname.lastname@example.org> wrote:
> On Tue, Jul 31, 2018 at 5:16 PM, Dibyendu Majumdar
> <email@example.com> wrote:
>> Are there features in Lua that could be removed to create a simpler language?
>> Of course 'simpler' needs to be defined.
>> Simpler for users?
>> Simpler for implementors?
>> Often these are conflicting goals.
>> I, for instance, never use co-routines ... and I know they add a bunch
>> of complexity both from implementation and user point of view.
> Coroutines are one of those things that are hard to understand and you
> can go for years without ever having a use case for them, but then one
> day you find a need for them and they make all the difference in the
What triggered this thought experiment was a recent talk on Ruby:
We also have Roberto's talk on the cost of adding features to Lua:
As someone trying to optimize Lua, I am very much aware of the
implementation cost of some features.
1) upvalues in Lua are like pointers to stack locations.
2) Debug api can manipulate values on the stack
3) C api can mess with the stack
All of these features are nice I am sure but, you have to pay a heavy
price in terms of the ability to optimize code.
I am surprised no one mentioned dropping boolean type by the way ...