Scala DoubleLinkedList替换 [英] Scala DoubleLinkedList replacement

查看:161
本文介绍了Scala DoubleLinkedList替换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从Scala 2.11.0( http://www.scala-lang.org/api/current/index.html#scala.collection.mutable.DoubleLinkedList $)。为什么是这样?似乎没有明确的替代。是否有继承人的计划?

DoubleLinkedList is deprecated since Scala 2.11.0 (http://www.scala-lang.org/api/current/index.html#scala.collection.mutable.DoubleLinkedList$). Why is this? There doesn't seem to be a clear replacement for it. Is there any plans for a successor?

推荐答案

异常危险的API,如提交消息和弃用中所述,总结起来。

"Idiosyncratic and dangerous" API, as it is described in the commit message and deprecation, sums it up.

一般方向是减小标准库,特别是集合的大小,所以很可能会更换一个替换(如果作为重新设计和重新设计的替换收藏库的一部分。 (正在努力。)

The general direction has been to reduce the size of the standard library, and of collections in particular, so it's likely that a replacement would arrive (if ever) only as part of a re-imagined and re-engineered replacement collections library. (There are efforts underway.)

最后的评论在这个问题上是顺序的,这甚至应该是工作吗?将2.8集合的许多标准API与可变性进行协调是非常困难的,这是将普通接口背后的可变和不可变集合统一的实验的一个原因已经达到其炒作

The last comments on this issue are of the order, "How is this even supposed to work?" It's surprisingly difficult to reconcile many of the standard API of the 2.8 collections with mutability, which is one reason the experiment to unify mutable and immutable collections behind common interfaces has lived up to its hype.

这篇关于Scala DoubleLinkedList替换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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