lua-users home
lua-l archive

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


In message <20111101093616.GA3906@rjek.com> you wrote:

> On Tue, Nov 01, 2011 at 09:20:24AM +0000, Gavin Wraith wrote:
> > In message <20111101013730.GA15339@magritte.tecgraf.puc-rio.br> you wrote:
> > 
> > > > there's no technical reason why lua couldn't permit ?, !, ???, and so forth.
...
> > RiscLua uses ?,!,$ in a way that is intended to keep BBC BASIC users
> > happy. They are empty tables with metamethods, so that ?[adr],![adr],$[adr]
> > correspond in usage to BBC BASIC's ?adr,!adr,$adr.
> 
> Ah, but what about BBC BASIC's (incidentally, inspired by BCPL)
> base!offset syntax? (Especially useful for structure manipulation.)  I
> think this would actually require their use as operators.

Have a look at http://www.wra1th.plus.com/lua/book/rb10.html#syntactical_poke

for more syntactic jiggery pokery with metatables and exploitation of Lua's higher
order features. Of course, syntax, like cuisine, is often a personal matter - 
one cannot expect to please all tastes :).

-- 
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/