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.
为什么在 Eiffel 中定义cloneorequal方法与 C# 中的类似方法相比,对类型问题提供了更大的保护?
clone
equal
clone实际上并equal没有提供任何很棒的东西。这 2 个例程即将淘汰,分别由最新的 estudio 版本中的twin和 operator取代。~
twin
~
这两个例程的问题在于不能提供很好的保护。两者都采用类型的对象ANY(这是一个问题)。他们的新版本更安全,并在编译时提供更好的控制。
ANY