lua-users home
lua-l archive

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


ps: Sorry; Class-Commons does just that.

2018-01-29 1:40 GMT-03:00 Italo Maia <italo.maia@gmail.com>:
I don't think lua, as a language, is perfect either, but it is in the right track. After seeing https://www.youtube.com/watch?v=EUvgoxBm7uc from Roberto, the way lua walks forwards becomes much clearer. 
Anyhow, coming from python, I hardly miss a switch/case structure but, an yield would be certainly interesting to gave upon. Also, type annotation would be very nice (helloooo ravi). Large code-bases could benefit tremendously from it.
Regarding OO with Lua, I hardly miss a built-in "class" support, but the lack of a standard interface for OO Lua libraries is a big bummer. Lots of incompatible OO libs. Something like: "if you want to build a lib to do this, try to make it compatible with this interface/behavior".


2018-01-28 23:20 GMT-03:00 Sean Conner <sean@conman.org>:
It was thus said that the Great Sean Conner once stated:
> It was thus said that the Great nobody once stated:
> > Beside incoming improvements, present Lua also contains lots of tiny
> > warts... NaN being unusable as a table key is one of the bigger kinks –
> > a "discontinuity" in the type/value space that's hard to check for and
> > generates complexity whenever you have to deal with it.
>
>   Just in case you are unaware (or others are unaware), NaN is a special
> value defined by IEEE-754 (or rather, values) that have a unique property:
>
>       x = 0/0
>       print(x,x==x)
>       nan     false
>
> A NaN is not equal to anything, including itself!  In fact, according to the
> standard, this:
>
>       x = 0/0
>       y = 0/0
>
> is not even guarenteed to produce the same bit pattern!  x and y just have
> to be designated as NaN.  So it would be difficult to make NaN to be a table
> value.

  I meant to say "it would be difficult to make NaN to be a table key."

  -spc (Sigh)





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



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