Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a limited Array-like object #32

Open
Mercerenies opened this issue May 14, 2018 · 0 comments
Open

Make a limited Array-like object #32

Mercerenies opened this issue May 14, 2018 · 0 comments

Comments

@Mercerenies
Copy link
Owner

Array now serves a dual purpose. First and foremost, it is a mutable collection. However, in a much older version of Latitude, arrays served a slightly different purpose: being meaningfully cloneable. pushBack, popBack, pushFront, and popFront are all designed to work correctly even in the presence of arrays which are cloned or from which clones have been made, but the collection methods do not respect this.

Array is a general-purpose mutable collection. This is, for better or worse, it's purpose in Latitude. As such, I suggest defining a new array-like data type (perhaps "Deque"?) which has only the push/pop methods and is designed to behave correctly when cloned.

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

No branches or pull requests

1 participant