[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How Lua code can be updated at runtime without breaking global state?
- From: Graham Wakefield <wakefield@...>
- Date: Thu, 28 Mar 2013 17:39:50 +0900
>
>
>> The distinction between function/expression evaluating and "lifting" a function into a behavior seems an important distinction.
>
> More for the implementation than for the user, I think; in practice it's usually pretty obvious what will happen. We could have made the distinction more apparent in the syntax, but since 90% of the time it does what you'd expect, we opted for terseness.
Or another way of looking at it is that "exprs are always behaviors"; except that some behaviors never change, so they can be evaluated to a constant once rather than continuously. E.g. Noise() generates a stream of random numbers, Random() generates a randomly chosen constant signal.