[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: proposal for reading individual characters from strings faster
- From: Tim Hill <drtimhill@...>
- Date: Sat, 3 May 2014 11:27:15 -0700
On May 3, 2014, at 5:55 AM, Coroutines <coroutines@gmail.com> wrote:
> On Sat, May 3, 2014 at 5:42 AM, Petite Abeille <petite.abeille@gmail.com> wrote:
>
>> "It would appear that Lua's clean syntax appeals to language improvers like a clean wall to graffiti sprayers."
>> — David Kastrup, Sep 2010
>
>
> I've also pondered a syntax for having functions evaluated only at
> compile-time if their operands are literal/static -- something like
> @string.byte('a')
>
> @ might later be used as an operator in some future major version of
> Lua (so I consider this bad), but `` is unlikely to be, as it isn't
> the traditional form of a single-char operator.
>
> Is this a blind dislike of any additional syntax sugar that this list
> is so well-known for? Or do you see it colliding with future plans
> for Lua? I do think `` might be confused with '' if you're skimming
> quickly -- that is a negativity.
>
> "Posters on lua-l are as disagreeable as Republicans to Democrats."
> -- Sir Pogsalot, Apr 2014
>
> ^ Things seem more profound in simile/quote-form.
>
One thing to remember is that compile time is not “free”, since in many environments Lua source is compiled JIT. In some of our applications code fragments are compiled, run once, and discarded. This makes compile time easily 50% of the total run time and is only feasible because the Lua compiler is so efficient.
—Tim