Comments (3)
不会,这是我们自己实现的数据结构,所以不会有问题,对foreach是友好的。
from framework.
在循环内修改抛异常的根本原因是由于删除元素或者增加元素导致内部数组偏移发生变化,最终导致迭代器不能反馈预期的值,如果程序不能够按照预期返回正确的值,这种行为非常危险,所以这时候.net的开发人员就加入了安全检查,如果检查到了变化那么主动抛出一个异常。
而catlib使用的sortset是我们自己实现的数据结构,底层实现是链表。所以可以友好的支持迭代内修改(当然我们也做了明确其迭代行为的处理)。
from framework.
soga,没整体看,懂了,谢谢详细解答哈。
from framework.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from framework.