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, count开发者_如何学编程ers, 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.)
No. Entity variables can only contain strings and numbers, arrays, structs, and any combination of such.
精彩评论