[Date Prev][Date Next][Thread Prev][Thread Next]
- From: ketmar <ketmar@...>
- Date: Sat, 28 Jun 2008 03:28:13 +0300
On Sat, 28 Jun 2008 01:19:13 +0100
Stephen Kellett <firstname.lastname@example.org> 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... %-(