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
Remove native from implementation code, use metadata #9850
Comments
Marked this as blocking #5979. |
We need something better specified than 'use metadata'.
We do have an 'external' keyword, but that currently tied up with the 'patch' mechanism which is unsuited to the DOM libraries. This is a related issue: Issue #9: Remove native keyword, replace with @native annotation BTW the editor team did not know about "native" either, but when it was described to them, they had a CL to handle native classes and methods within the hour. It might be more efficient in the short term to simply educate the tool vendors how to work around the native 'keyword'. |
Thanks Stephen. My point is, if our tool ecosystem has to deal with native and patch, we should either put it into the language or use language constructs. Having these "shadow" features seems weird to be, and are barriers to a richer tool ecosystem. |
This comment was originally written by Hannes.R...@gmail.com Hi :), currently I use the native keyword. Thanks |
Hannes, for the foreseeable future the native keyword is the way to interact with native extensions to the Dart code from the VM. |
This comment was originally written by Hannes.R...@gmail.com Cool, thanks! |
Is the "native" keyword used in any place except the VM patch files? If so, could we change those other places to use "external" instead. If they need a string, that can be added as metadata, like @NativeCode("whattamagonnacall") ? If it's only the VM using it now, we can close this issue. |
It seems that, at least, the _blink/dartium, dart2js html, js/js_dart2js and tools/dom libraries use "native" notation. |
Added Library-Html label. |
Duplicate of #11606. |
We have metadata now, we don't need secret unspecified language features.
We have external tool vendors that are trying to work with Dart, and they run into 'native' which is unspecified.
Also, not sure where to file this because it's an implementation issue, not a Language issue.
The text was updated successfully, but these errors were encountered: