Skip to content

[Feature] How to implement Dynamic Arrays? #105

@ngjunsiang

Description

@ngjunsiang

Dynamic arrays are an implementation of arrays that allows resizing (an O(n) operation) when they are full, or when a threshold for length is reached.

In the current implementation:

  1. Array sizes must be explicitly declared, and cannot change once declared.
  2. An array can only be assigned to a variable if the other variable is also declared as an array with the same size and type.

This makes it impossible to implement dynamic arrays, unless some rules of pseudocode are relaxed. The crux of the issue is that there has to be some way to "pass" arrays around: the current way only allows this if two variables have the exact same declaration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions