First-class functions: Difference between revisions

Line 230:
answers -- Result: {0.5, 0.5, 0.5}</lang>
 
Putting math libraries aside for the moment (we can always shell out to bash functions like '''bc'''), a deeper issue is that the architectural position of functions in the AppleScript type system is simply a little too incoherent and second class to facilitate really frictionless work with real first-class functions. (This is clearly not what AppleScript was originally designed for).
 
Incoherent, in the sense that built-in functions and operators do not have the same place in the type system as user functions. The former are described as 'commands' in parser errors, and have to be wrapped in user handlers if they are to be used interchangeably with other functions.
9,659

edits