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

Consider removing the Primitive class from the library/language #78

Open
smarr opened this issue Jul 25, 2021 · 0 comments
Open

Consider removing the Primitive class from the library/language #78

smarr opened this issue Jul 25, 2021 · 0 comments
Labels
language design This issue requires design decisions

Comments

@smarr
Copy link
Member

smarr commented Jul 25, 2021

Currently, we distinguish between Primitive and Method.
All defined methods that use the = primitive marker are indicated as being primitives at run time by being instances of Primitive.
With the wide variety of implementations, it's unclear whether there's any benefit of distinguishing between methods and primitives at the language level.
Often, implementations will replace core library methods for better performance.

So, I think the concept of a Method should include primitives as well.

This reduce the exposure of implementation differences, but doesn't completely remove it.
Currently, one can still detect a VM messing with the core library by checking for method identities.
Though, that's a somewhat weaker signal, I guess.

The perhaps most visible benefit of removing Primitive is that the two basically identical classes become just one.

@smarr smarr added the language design This issue requires design decisions label Jul 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language design This issue requires design decisions
Projects
None yet
Development

No branches or pull requests

1 participant