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

syntax debate: annotations vs specialized syntax #12

Open
sigmundch opened this issue Mar 31, 2015 · 2 comments
Open

syntax debate: annotations vs specialized syntax #12

sigmundch opened this issue Mar 31, 2015 · 2 comments
Labels

Comments

@sigmundch
Copy link
Owner

The design doc includes a long discussion about syntax alternatives.

Let's use this issue to keep the syntax discussion in one place.

@sigmundch
Copy link
Owner Author

One concern I raised in the doc is that by using annotations we will add semantic meaning to metadata in the language. Turns out there are two aspects to this concern, but I mainly addressed one in the doc:

  1. users will see the semantic meaning
  2. the VM runtime needs to be aware of the semantic meaning: this can make metadata expensive in the VM

@gbracha - is (2) your main concern?

In the doc I mainly talked about (1). I believe it is not an issue because frameworks already do this today. Mirrors expose annotations and frameworks give it a semantic meaning.

As for (2), it would be great to understand what the runtime does today and how much extra cost we are talking about. In particular, is the runtime evaluating the const expressions to build the annotations already? If so, the extra cost we are adding is basically and instance-of check (the cost of applying interceptors will be there with the other syntax too). Could we measure this and see who much of a cost this is? I expect that snapshots could store this information efficiently too, since it can all be computed statically.

@sigmundch
Copy link
Owner Author

Issue #11 brings up an important question: are interceptors part of the public API or a hidden implementation detail.

If it's the former, then annotations might not convey that intuition and using a dedicated syntax might be the way to go.

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

No branches or pull requests

1 participant