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

Explain the concept of composalizable #3131

Open
JJ opened this issue Dec 22, 2019 · 4 comments
Open

Explain the concept of composalizable #3131

JJ opened this issue Dec 22, 2019 · 4 comments
Labels
docs Documentation issue (primary issue type) NOTSPECCED need roast tests before documenting
Milestone

Comments

@JJ
Copy link
Contributor

JJ commented Dec 22, 2019

The problem

While checking the (not-so) new behavior of does I found the concept of composalizable, which are classes that, even if they cannot be composed, behave as if they were.

Suggestions

Apparently just enums behave that way. But we'll have to research it a bit further.

@JJ JJ added the docs Documentation issue (primary issue type) label Dec 22, 2019
@JJ
Copy link
Contributor Author

JJ commented Dec 22, 2019

Composalizable is mentioned in Raku/roast#402 as not specced yet.

@JJ JJ added the NOTSPECCED need roast tests before documenting label Dec 22, 2019
JJ added a commit to JJ/my-raku-examples that referenced this issue Dec 22, 2019
@jnthn
Copy link
Contributor

jnthn commented Dec 22, 2019

Generally, archetypes are a mechanism that describe the way a certain kind of type behaves, and so answer questions like "does it make sense to inherit from this", "does it make sense to compose this", "can this thing turn into something I can inherit" (for example, you an is SomeRule, which results in inheriting from the pun), or "can this thing turn into something I can compose" (the role case that you asked about). The point was to avoid hardcoding things like "role", "grammar", and "class" into the compiler as special cases when deciding the contexts in which a type may be used, thus allowing for a more extensible meta-space.

Apparently just enums behave that way.

This matches my recollection. Here's the implementation of what it means to composalize an enum.

@jnthn
Copy link
Contributor

jnthn commented Dec 22, 2019

Ah, and to add: the archetypes were considered as something to eventually spec provided the design held up, so no objections to documenting.

@JJ
Copy link
Contributor Author

JJ commented Dec 22, 2019 via email

@JJ JJ mentioned this issue Dec 23, 2019
@coke coke added this to the backlog milestone Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation issue (primary issue type) NOTSPECCED need roast tests before documenting
Projects
None yet
Development

No branches or pull requests

3 participants