[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Thought experiment: what would you remove from Lua
- From: Sean Conner <sean@...>
- Date: Wed, 1 Aug 2018 16:28:49 -0400
It was thus said that the Great Dibyendu Majumdar once stated:
> On 1 August 2018 at 19:46, Dirk Laurie <email@example.com> wrote:
> > 2018-08-01 19:57 GMT+02:00 Phil Leblanc <firstname.lastname@example.org>:
> >> Thought experiment level 2:
> >> -- Remove metatables
> >> i.e. less "object-oriented" things. Going more with plain functions,
> >> tables of functions and closures.
> > In fact, it is a nostalgia list for a previous Lua: 4.0 had no
> > metatables (but it did have tag methods).
> Meta tables are indeed another problematic feature from optimization
> point of view. Of course it seems grand that the table type is reused
> to hold meta information too - wonderful unifying design! Except that
> now an implementation detail has become user visible, and the
> implementor has no way of knowing what the user might do.
> The more you allow users to mess with 'meta' information, including
> stacks, in uncontrolled ways, the harder it becomes to implement
> efficient implementations (unless you are a genius called Mark Pall).
So, how would you implement meta information then? What, specifically, is
difficult with the current design?