[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Thought experiment: what would you remove from Lua
- From: Coda Highland <chighland@...>
- Date: Tue, 31 Jul 2018 18:10:32 -0500
On Tue, Jul 31, 2018 at 5:16 PM, Dibyendu Majumdar
<mobile@majumdar.org.uk> 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.
>
> Another feature I never use is inheritance - at most I use simple class objects.
>
> Regards
> Dibyendu
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
world.
Certainly they're not STRICTLY necessary, as it's always possible to
use closures and state machines to implement the same functionality,
but when they're the right tool for the job then having them supported
at the language level makes them much easier to work with and reason
about than the alternative.
/s/ Adam