如何在Dart中克隆对象(深层副本)? [英] How can I clone an Object (deep copy) in Dart?

查看:712
本文介绍了如何在Dart中克隆对象(深层副本)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有支持语言的方式在Dart中创建对象的完整(深)副本?

Is there a Language supported way make a full (deep) copy of an Object in Dart?

有多种方法可以做到这一点,以及有什么区别?

Secondary only; are there multiple ways of doing this, and what are the differences?

感谢您的澄清!

推荐答案

没有开放的问题似乎暗示:

No as far as open issues seems to suggest:

http://code.google.com/p/dart/issues/detail?id=3367

具体来说:

.. Objects have identity, and you can only pass around references to them. There is no implicit copying.

这篇关于如何在Dart中克隆对象(深层副本)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆