|
On 20/06/2019 12:36, Rodrigo Azevedo wrote:
Em Qui, 20 de jun de 2019 02:40, Egor Skriptunoff < egor.skriptunoff@gmail.com> escreveu:On Fri, Jun 14, 2019 at 11:22 PM Viacheslav Usov wrote:This is probably bikeshedding, but: local (x scoped), (y const), (z const alias) = a, b, cThis is a nice bikeshedding! From aesthetic point of view, it looks more pleasant than other possible syntax such as <const>, @const and :const+1 As a 'per Name' syntax, but 'scoped' is not a good word.
Yep, but a little better than "toclose", IMO (and the related metamethod could be named as "__scope_handler", for example, which is more readable and explicit than "__close").
Actually it would be nice if someone could come up with a word that coul express the real concept clearly. For example: "at_scope_end" (or and "__at_scope_end" as a metamethod. Of course those are UGLY.
Maybe "atend"? It's more explicit than "toclose" since actually describes that something happens when execution flow reaches the "end" keyword. "__atend" is not bad as a metamethod.
Maybe, it could be extended to a 'per type' 'local' (local const) x, y, z =... Where x, y and z are all 'const'.
Mmmh, here the syntax is getting really messy.