lua-users home
lua-l archive

Re: Thought experiment: what would you remove from Lua

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


2018年08月01日 9:03 GMT+02:00 Axel Kittenberger <axkibe@gmail.com>:
> dibyendu> Are there features in Lua that could be removed to create a
> simpler language?
>
> - the .. operator
Hang on, that's in Lua 1.0. One can't go lower than Lua 1.0.
> implicit string/number coercions.
That's already out in Lua 5.4. Compatibility with 5.3 comes in a metatable.
> - goto,
I use this only when implementing pseudocode from Knuth's books. My
attempts to do without it always seem to introduce subtle logic bugs.
> the only sensible applications IMO can be replaced with better:
> continue and a more sophisticated try/except/throw scheme than pcall.
Anyway, the OP did not ask what you would add, only what you would remove.
> it probably was one of the better ideas (for example the
> : operator vs. JS 'this' shenanigans, or metatables in general etc.).
'self' is so much nicer than 'this', yes? :-)

AltStyle によって変換されたページ (->オリジナル) /