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

Proposition for complex cons operator #106

Closed
wants to merge 1 commit into from

Conversation

FayCarsons
Copy link
Collaborator

I thought it may be nice to be able to cons new shapes onto already constructed complex shapes, so I added an infix operator <> (borrowed from Haskell). I would be fine with renaming it and making it prefix, but this is what I liked.

@nikochiko
Copy link
Collaborator

I don't think we should have this - this feels somewhat more stateful and can be done with lists.
I don't want us to commit to maintaining functionality that can be achieved easily without this library.

@FayCarsons
Copy link
Collaborator Author

I don't think we should have this - this feels somewhat more stateful and can be done with lists.
I don't want us to commit to maintaining functionality that can be achieved easily without this library.

If you do this with a list, transformations won't be applied uniformly.

Users cannot extract the list of shapes out of a complex shape to do operations on it. Creating a complex shape, transforming it, and then adding a new shape to it will be impossible without this. I thought that may be nice functionality to have. And it's entirely stateless.

@FayCarsons
Copy link
Collaborator Author

Realized this is the logical negation operator and also that this can be achieved by nesting complex shapes. Closing

@FayCarsons FayCarsons closed this Mar 8, 2024
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.

2 participants