lua-users home
lua-l archive

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


> 
> 
>> 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.