lua-users home
lua-l archive

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


> 2) It's not *quite* as efficient as the old solution, because it requires
> two tag-method lookups in many cases. However, with Lua 4.1, unsuccessful
> tag method lookups are cached so it may not matter much, so I'll yield on
> that, too.

That's true, I hadn't thought of that. Caching would probably be a good
thing.

> Another distraction: proper support for partial orders wants to have two or
> three other type-despatched functions: "least greater", "greatest lesser",
> and possibly "canonical". In the case of total orders, these are "max",
> "min" and "identity".

Looks like a case for using that nice generic tag-method maker posted a
few days ago.

> I definitely noticed the lack of those whilst writing a LALR(1) parser
> generator in Lua. (Lua parser coming soon; I got the classic calculator
> working last night, so I can't be far off. If only work didn't get in
> the way so much....)

Ooh, that I want!

-- 
http://sc3d.org/rrt/ | egrep, n.  a bird that debugs bison