[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Thought experiment: what would you remove from Lua
- From: Axel Kittenberger <axkibe@...>
- Date: Wed, 1 Aug 2018 09:03:23 +0200
dibyendu> Are there features in Lua that could be removed to create a simpler language?
- the .. operator and with it implicit string/number coercions.
- goto, the only sensible applications IMO can be replaced with better: continue and a more sophisticated try/except/throw scheme than pcall.
As a rule of thumb I'd say, if it's a feature that's not found in most other programming languages in similar areas and it's controversial, it was probably not that good of an idea. However, if it's a feature that distinguishes Lua from other programming languages and there is a wider consensus about it, it probably was one of the better ideas (for example the : operator vs. JS 'this' shenanigans, or metatables in general etc.).