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

feat(stdlib): Added empty constant to immutable data structures #1466

Merged
merged 5 commits into from
Nov 8, 2022

Conversation

alex-snezhko
Copy link
Member

As suggested in #1414 (comment), immutable data structures should have an empty constant instead of a make() function where possible. This PR extends this idea to the remaining immutable data structures (Stack, Queue, Immutable Priority Queue).

Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question to core team about when we should remove the make functions

stdlib/queue.gr Outdated Show resolved Hide resolved
stdlib/stack.gr Outdated Show resolved Hide resolved
@alex-snezhko alex-snezhko changed the title Immutable ds empty feat(stdlib): Added 'empty' constants to immutable DS to succeed make() Nov 4, 2022
@phated phated changed the title feat(stdlib): Added 'empty' constants to immutable DS to succeed make() feat(stdlib): Added empty constant to immutable data structures Nov 7, 2022
Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks

@phated phated requested a review from ospencer November 8, 2022 23:46
Copy link
Member

@ospencer ospencer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thank you!

@phated phated merged commit 427335f into grain-lang:main Nov 8, 2022
@github-actions github-actions bot mentioned this pull request Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants