lua-users home
lua-l archive

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


On Mon, 2005-01-31 at 13:20, David Olofson wrote:

> > This would simplify the core, slow down processing due
> > to the indirection, and make things extensible,
> > since you can replace the 'add' function.
> 
> Dunno if it would slow things down all that much, actually... Calls 
> through function pointers are slightly slower, but switches and other 
> conditionals aren't exactly free either. 

Sure but I actually meant the bytecode should call a *Lua* function
not a C one.

I.e. it should treat

	a + b

just the same way it treads

	add (a,b)

right now. The standard library would predefine 'add'
to work just the same as 'a + b' does right now..

However since lookup in Lua is dynamic .. you could replace it
at run time :)


-- 
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net