开发者

Can entity variables be functions?

开发者 https://www.devze.com 2023-02-23 11:32 出处:网络
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开发者_如何学编程e

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消