lua-users home
lua-l archive

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


(1) '5' + 5 gives you an 10.0 in the interactive console. Isn't this a weakly typed language behavior?
(2) '5' + 5 > 10.0, string plus integer equals float. If an error was throw here, it would be easier to understand than the given behavior.


2017-06-19 17:35 GMT-03:00 Coda Highland <chighland@gmail.com>:
On Mon, Jun 19, 2017 at 2:15 PM, Italo Maia <italo.maia@gmail.com> wrote:
> Well, out of the features mentioned, strong typing would be a simplification
> of the language, by all means. Anyway ... a roadmap would be nice.

Two things:

(1) Lua is already strongly typed. It just has a very small list of
recognized types, and one of those types is "table".

(2) Stronger typing than this would not simplify the language
whatsoever. It would require a mechanism by which user-defined types
can be added as well as mechanisms by which these types can be
identified, manipulated, and instantiated. You could reasonably argue
that it might make the language more ROBUST, but it would not by any
means be SIMPLER.

/s/ Adam




--
"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
===========================