You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the past, there was a Scala implementation of a mutable double linked list, which has since been deprecated. I'm sure there were good reasons for this at the time, but I strongly believe this is an important data structure to bring into Scala. It is not unusual to need fast insertion or removal at both ends or even just at the end, but where the order matters and it's not ok to build the list in reverse and reverse it when the correct order is needed.
One could argue that in most cases the same result can be achieved by thinking more functional, however there are cases where this would be at the cost of performance. Additionally, to me Scala is a language that does not enforce a particular paradigm on the programmer, so it should be possible for a Java guy to write an algorithm in Scala the same way he would have written it imperatively, without having to massively rework and reoptimize the algorithm.
I'm creating this issue so that relevant people can (re-)evaluate the possibility of introduce back an implementation for this data structure.
The text was updated successfully, but these errors were encountered:
@ruippeixotog said:
I agree a mutable double linked list is a good collection to have in a standard library. I'm willing to work on a full implementation (i.e. without relying on List or other existing collection) with Java-level performance if more people agree with it.
Hi,
In the past, there was a Scala implementation of a mutable double linked list, which has since been deprecated. I'm sure there were good reasons for this at the time, but I strongly believe this is an important data structure to bring into Scala. It is not unusual to need fast insertion or removal at both ends or even just at the end, but where the order matters and it's not ok to build the list in reverse and reverse it when the correct order is needed.
One could argue that in most cases the same result can be achieved by thinking more functional, however there are cases where this would be at the cost of performance. Additionally, to me Scala is a language that does not enforce a particular paradigm on the programmer, so it should be possible for a Java guy to write an algorithm in Scala the same way he would have written it imperatively, without having to massively rework and reoptimize the algorithm.
I'm creating this issue so that relevant people can (re-)evaluate the possibility of introduce back an implementation for this data structure.
The text was updated successfully, but these errors were encountered: