Search code examples
krl

Can entity variables be functions?


Since functions and actions are first-class, is it possible for an entity variable to hold a function? Historically that was not the case; entity variables could only be flags, counters, trails, or literals.

A corollary to that, if the answer is true. Can a function be defined in a postlude and assigned directly to an entity variable?

(This is a question from the CS 462 mailing list.)


Solution

  • No. Entity variables can only contain strings and numbers, arrays, structs, and any combination of such.