在聚合物Dart 1.0中映射的替代方法是什么?
问题描述:
我注意到 Polymer Dart问题#569 中的不鼓励使用地图,因为它们效率低下。什么是(将)替代?我使用地图很多。
I notice in the Polymer Dart issue #569, that the use of maps is discouraged, because they're inefficient. What is (will be) the alternative? I use maps a lot.
答
关于无效率的评论的原始推理不再适用。以前,每次将其传递给JS时,整个映射都必须复制到一个新的JsObject中,但情况并非如此。
The original reasoning for the comment about inefficiency no longer applies. Previously the whole map had to be copied to a new JsObject each time it was passed to JS, but that is no longer the case.