lua-users home
lua-l archive

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


PA wrote:


On Aug 27, 2005, at 16:36, Mike Pall wrote:

Interesting. Looks like many programmers (when new to Lua or
to its ancestor languages) experience the same learning curve.


I would guess that the same applies to any/most new languages one tries to learn, no?

8. object equality vs. object identity.


Doesn't the __eq metamethod cater to both?

No, it has what is for me a fatal flaw. You cannot compare a userdata to a number, for instance. Rici has pointed out an interesting angle on this that I have yet to try. So there may be hope.

--
chris marrin              ,""$, "As a general rule,don't solve puzzles
chris@marrin.com        b`    $  that open portals to Hell" ,,.
        ,.`           ,b`    ,`                            , 1$'
     ,|`             mP    ,`                              :$$'     ,mm
   ,b"              b"   ,`            ,mm      m$$    ,m         ,`P$$
  m$`             ,b`  .` ,mm        ,'|$P   ,|"1$`  ,b$P       ,`  :$1
 b$`             ,$: :,`` |$$      ,`   $$` ,|` ,$$,,`"$$     .`    :$|
b$|            _m$`,:`    :$1   ,`     ,$Pm|`    `    :$$,..;"'     |$:
P$b,      _;b$$b$1"       |$$ ,`      ,$$"             ``'          $$
 ```"```'"    `"`         `""`        ""`                          ,P`