Value of function from a group NOT in the message path
Dar Scott
dsc at swcp.com
Wed Jun 16 11:57:45 EDT 2004
On Jun 15, 2004, at 11:12 PM, Troy Rollins wrote:
> Funny, for an "easy" syntax language, I sure get fouled up in it every
> time I've been away a while working with... well, all those dot-syntax
> languages. Anytime Transcript acts like one the "()" above, I slap my
> forehead, and go duh!
>
> But then, of course, the function name IS in quotes. How weird is
> that? ;-)
The functional notation as in f(x) and g(x,y) is broader than in
programming languages.
The quotes are there because a compiling is done every time. The
commands send, call and do all compile as well as the functions value()
and merge(). These are not precompiled. This allows the expression be
be built at runtime.
The expression for value() may be fairly complex and need not refer to
a function. It might be something like "x > 5".
Values in Transcript are (virtually) strings, so it is natural for
expressions and sequences of commands to be represented as strings. In
fact, a script is compiled in the simple act of setting the script
property of some object to some string.
(Given that, I would like to have function-values of some sort, not
pointers, but a sort of lambda value. Maybe a sort of caching or
partial compiling would help in that direction.)
Dar Scott
More information about the use-livecode
mailing list