again, sorry for replying on the wrong channel.

On Wed, 4 Nov 2020 at 17:35, Hans Hagen <j.hagen@xs4all.nl> wrote:

it would harm performance because it involves parsing all values and
also ways around cases where the title is "function" (lieral text).

I'm not sure I understand what you mean by literal text "function" here, but in any case isn't it a one-off <1ms cost to parse a function?

> "function() local x=1; return function() x=1-x; return ({'black',
> 'gray'})[x] end end"
> can be way much easier for lua speakers than digging up a bunch of
> documentations to figure out whether it's implemented, or how it can be
> implemented in a language like TeX, or both which is worse.
Really? I have no clue what that function makec clearer than tex. And
one still needs some documentation that explains what it does.

Often there often is a pretty clean way to do it with less code.

For an experienced tex speaker, indeed.
But for an average user who just wants to typeset a bit of fancy stuff, programming in tex is probably not the most pleasant thing to do and arguably not the most reasonable either in light of any modern language like lua.

Sylvain