lua-users home
lua-l archive

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


On Wed, Mar 7, 2012 at 5:26 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> Why is it that we always have so much fun on lua-list discussing
> syntax features that obviously the triumvirate will never include
> in any future Lua?

Sometimes they do: ask John Ramsdell. Heck, even I suggested the =expr
shortcut that ended up in lua.c.

OK, OK, the example of banishing %-syntax is not really syntax and not
good evidence. But in a lot of cases the discussion of syntax
ultimately is about semantics anyway. I started the "(amb) is tedious
without terse lambdas" thread and ended up learning that although
procedure constructors are *a* way of accomplishing the goal of
supporting domain-specific control mechanisms, they are not the only
possible language feature to do so, and may be too general for that
particular case.

Then there are indirect effects. For example { function a() end
function b() end } -> { a=function() end, b=function() end } guides
people to particular styles. I think it's natural to wonder if you're
writing a lot of the latter why the shortcut doesn't exist. There's
the syntactic oddity of { function c() end 1 }, but there are some
larger factors. Encouraging the use of a lot of table constructors
containing procedure constructors may not be a great idea, especially
if it the mini-module syntax makes you think there is only a single
statically-allocated table in:

    for i,v in pairs(fragments) do
        xml.parse(v, {
            function end_tag(t)
                print("closing tag", t, "at index", i)
            end
        })
    end

when there's a table+closure's worth of garbage created per iteration.
Not that this example is especially slow or surprising, but I'm not
sure how it scales to a Lightroom-sized ecosystem of people using this
pattern.

Consideration of this sort of thing usually does lead to thinking
about semantics: is there a better structure for doing this? etc

> Is it for the same reason that we love to plan how we will spend
> our Lotto winnings, or what it would be like to spend an evening
> in the company of <enter name of celebrity>?

Repeat after me: upstream is not the last word. And they're not deaf, anyway.

Roberto and lhf do not have something to say on every thread, but my
personal, scatter-brained impression has been that they sure do read a
lot of lua-l, and recall of careful argument does sometimes show up in
modified form, or otherwise influence the language later.

Posting "me too" (or this century's "+1") doesn't seem to go anywhere,
if for no other reason than it is really boring and forgettable. :-)

Jay