lua-users home
lua-l archive

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


On Sun, 2 Jun 2019 at 16:33, Dibyendu Majumdar <mobile@majumdar.org.uk> wrote:
>
> I hate the syntax for the Rust language. It kind of spoils it for me.
>
> Do people find anything ugly about current Lua syntax?
> What about the proposed new syntax <toclose> and <const>?
>

Perhaps I should add my own thoughts on this.

Firstly it is hard to come up with a syntax that is not ugly - unless
new keywords are introduced.

I think 'toclose' as a word is odd ... it is made of two words that
are concatenated. Doesn't quite fit in with the rest of the language.
A single word might be nicer - I quite liked the original (?) proposal
'scope' or 'scoped'.

'const' is also unlike Lua, I mean Lua tends to use full words. So
'constant' might be nicer.

Syntactically new keywords are hard to beat I guess:

constant name = 'Dibyendu'
scoped file = f:open()

Regards