Skip to content

Maybe include DList #21

Closed
Closed

Description

@Anton-Latukha

DList is still in regular use & considering it is a pretty classical structure - expected to be in use.

Ans since DList actively piggy-backs on GHC abilities of lazy function application - it seems to have strong immunity to regressions, which can happen frequently in other data structures as in Vector.

Therefore it is interesting to see DList results & they are probably much more stable through time & GHC versions & can be a bedrock for comparison.

Activity

  1. Anton-Latukha commented on Nov 22, 2021

    @Anton-Latukha
    ContributorAuthor

    It is very inspiring to find out that that old folk doubtful DList fix for [] recommendation, does not just hold water - but actually was a strong true path to follow all along.

  2. chrisdone commented on Nov 22, 2021

    @chrisdone
    Member

    Certainly its consing and appending is good and seems to just be a better [] type, you're right.

  3. Anton-Latukha commented on Nov 22, 2021

    @Anton-Latukha
    ContributorAuthor

    Well, it is logical that if the imperative list is considered a mistake & could not suitable for Haskell laziness - then where is lazy version of a list that is suitable for Haskell. And a Difference List that is.

    Also would still note that Haskell strives towards the Philip's Wadler thesis "Listlessness is better than laziness" (1984), so I also have a lot of questions now - which type, [] or DList is simpler to fuse/keep deforestation on & how they comparatively currently optimized by GHC, how far we gone into [] to be able to retroactively adopt the same level of fusion/deforestation for DList - there are only several people that can answer this. & I hope the spread of DList numbers & use would refresh those thoughts to surface in Haskell Committee/GHC & we would at least hear more thoughts on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions