lua-users home
lua-l archive

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

Sorry, had missed that post.

In my tests, using the -l loading for token filters was absolutely okay; 'require' not required.. ;)

I can see the problems arising from a module that relies on some token-modded behaviour, but such modules should just not be made. I think this isn't a problem in the generic sense; people would use token filters for small syntax "enhancements" easying the application level work they do, knowing which ones they load in _their_ environment. Modules and redistributable code should use plain Lua only.

Combining different token filters was already solved (I think you knew), based on lhf's and my code. 

So is syntax awareness of the filtering (_without_ metalua).

I am _not_ pushing for a premature verdict on the technology; there i.e. needs to be guidelines as to when code can be said to be "Lua" if it uses token filtered syntax. Can it ever? 

Do other languages have this feature available, and how did they avoid (did they?) the potentional fragmentation of source code base.

I agree, it truly is a whole new world...    Maybe call it something else than Lua, until we map the world?


However, anything that affects compilation involves a lot of trouble
with modularity. For instance, we could use neither 'require' nor other
parts of the module system to load new operators. Also, these "modules"
defining new operators would need to be present at pre-compilation (if
one uses pre-compilation), which means that pre-compilation would need
pathes. There is also the problem of how to combine different "modules"
providing new operators, how these definitions propagate to 'loadfile'
and 'loadstring' (keeping in mind that this propagation has no effect if
the file or string is already precompiled), etc. In short, it is a whole
new world...

(In my personal view, this problem of managing definitions is more
complex and more important than the mechanism per se. I see it as the
main difficulty in designing anything that affects compilation, such as
macros, generic operators, etc.)

Roberto Ierusalimschy kirjoitti 12.4.2007 kello 19:31:

Instead of asking for += (which I, too, would like to use) one might  
re-ask about the status on mainstreaming token filters into Lua?  :)

Actually, quite recently I sent a message about this: 

-- Roberto