lua-users home
lua-l archive

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


Actually, auto-S2N coercion _has been removed_ from the current work
version of Lua 5.4.

This is really good news!

Where can I read more about 6) ?


Em sex, 22 de fev de 2019 às 14:54, Philippe Verdy <verdy_p@wanadoo.fr> escreveu:
I also think that the "*" syntax in declarations is very tricky, and in fact confusing (for most C/C++ programmers).

I would much prefer a syntax using annotations (like in Java and other languages, using "@" instead, or like in C/C++ using a keyword in the declarator, with a parameter specifying the annotation/usage we want.
The use of "*" alone does not allow any further development or generalization for annotations.

So I suggest instead:
  local n, @toclose cl, @toclose(options...) cl1, @todo(things) cl2

And then create a object-oriented framework for these annotations (not just this syntax but a way to declare each "@identifier" as a sort of "metaclass" with properties, methods, metatable, and specify those "@identifier" that are ignorable, and those that are builtin and will become part of the language later (and may be checked at compile time, or load time, or run time...
These annotations can augment the type system, can help compilers to find useful hints, can help code generators or code refactoring tools in source editors, can help document the objects/classes, can specify implementations limits, contracts, and check them when reusing components, can be used to infer proxing objects, can specify the transactional model (for transaction coordinators, working with both loal and remote objects).



--
"A arrogância é a arma dos fracos."

===========================
Me. Italo Moreira Campelo Maia
Co-fundador do Grupo de Usuários Python do Ceará
Secretário ForHacker (fb.com/ForHackerSpace)
Desenvolvedor Full-Stack, Escritor, Empresário, Visionário
-----------------------------------------------------
Meu Livro, Site, Blog
===========================