Skip to content

Add doubly linked list. #1815

@spotandjake

Description

@spotandjake

Currently grian has linked lists which are awesome when you need them but have limitations such as arbitrary spread is not efficent and it isnt well suited for every situation such as if you need to remove an element from the middle of the list which could be a common task.

A solution to this would be to add doubly linked lists.

The first question is do we think it makes sense to add them at all, adding another type of list data structure when there is already confusion for some people about when to use arrays or lists might just make things wort though i dont think it will really be that big a deal.

The second is how niche / much use do we think it will get do we want this in the compiler or in the stdlib.

and thirdly if we choose the compiler route which has advantages such as syntax, easy spread and pattern matching what would syntax look like maybe something like [|1,2,3|] but that would need to be deteremined with arrays and lists [] is kind of already full more symbols might not help.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions