lua-users home
lua-l archive

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


On Fri, 31 May 2019 08:48:03 +0100
Rob Kendrick <rjek@rjek.com> wrote:

> It has a few pleasing properties: does not introduce new keywords, does not break
> existing code, extensible to other decorations in future

I agree adding new keywords is probably not a great idea. But maybe we can agree that the syntax feels "foreign" to the existing syntax.

In PiL 16.4 about Privacy in OOP it says "If you do not want to access something inside and object, just *do not do it*." I think the same could be said about changing the values of constants. We already have ways of creating read only variables with metatables and proxies, or enclosed variables which seems a much more idiomatic solution than the new syntax. Yes I realize both methods have overhead.