lua-users home
lua-l archive

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



Scrap the whole ^ operator!

I mean, it's not so many people (right?) that really use/need it. And that would free it to be used for xor in binary operator patches...

Use math.pow( n, exp ) instaed?
-ak


2.7.2004 kello 15:38, Roberto Ierusalimschy kirjoitti:

 "<num> ^ <num>" needs "__pow"

We hate that. Any suggestions? (The point is: we don't want to use pow
inside the core, because then we would need the math library to compile
it. Maybe store it in the registry??)


"for .. in <table>" (old style) needs "next"

That use is deprecated.


"ipairs" needs "ipairs"
"pairs" needs "next"

Both will use private functions.


"print" needs "tostring"

The idea here is that, if you change tostring, print could use the new
version. But maybe the "correct" way would be using __tostring?


"require" needs "LUA_PATH" and "_LOADED"

LUA_PATH is optional.  _LOADED is used "read-only", so require could
keep a private reference to it?

-- Roberto