Set::Scalar 宇宙如何工作?
我创建了很多集合,并且我注意到它们都共享同一个宇宙。
我不明白宇宙是如何维持的。它是脚本中所有集合共享的一个宇宙(某个全局变量)吗?
I have created many sets and I noticed that all share the same universe.
I couldn't figure out how the universes is maintained. Is it one universe shared by all sets in the script (some global variable)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,实际上它是 Set::Scalar::Universe:
然后在 Set::Scalar 中你有:
它只是获取一个副本该变量的值(在加载 Set::Scalar::Universe 时初始化。Set
::Scalar 文档顺便提到,不相交的 Universe 尚未实现。
Well, actually it's a lexical variable in Set::Scalar::Universe:
Then in Set::Scalar you have:
which simply fetches a copy of that one variable (which got initialized when Set::Scalar::Universe was loaded.
The Set::Scalar docs mention in passing that disjoint universes are not yet implemented.