Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我什么时候使用像“book:Book”和“:Book”这样的命名对象。大多数书籍都在一个图表中。有时我应该使用命名和其他匿名吗?
然后,下划线代表什么我记得在某处读过它......
按照要求 :-)
:Book 通常表示 book 的任意实例,点是具体实例是不相关的。book:Book 通常意味着实例身份在某些方面很重要。例如,假设将两本书添加到订单中。您可以将它们命名为 book1 和 book2,以便区分它们。
hth。