lua-users home
lua-l archive

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


On Sat, 28 Jun 2008 01:19:13 +0100
Stephen Kellett <lua@objmedia.demon.co.uk> wrote:

> There are a lot of built in types in JS. Don't beleive me? - please 
> examine the Firefox source.
can't find anything there. number, string, boolean, array, object, null,
undefined. that's all. 'native objects' aren't 'built-in types'.

just looked at my own Lua sources: all my classes has "tostring" and
"className". it's not enforced by the API (and it's good), but it's
there, i'm not too lazy to write several lines of code.

either i don't understand you, or you don't understand me. i can't see
any reason to enforce type info in userdata registration (as done for
'native objects' in JS). it's a price of freedom. API with restrictions
or self-restrictions. JS chooses first. Lua chooses second. i
personally prefer Lua way.

and btw: spidermonkey API is sooooo ugly... %-(