Skip to content

Eliminating native syntax #28791

Open
Open
@peter-ahe-google

Description

@peter-ahe-google

I wonder if we can eliminate the native syntax used by at least the Dart VM. At some point, dart2js used it as well in dart:html, but I'm not sure that's the case any more.

Here's an example of a getter using the native syntax:

int get length native "List_getLength";

And here's how I'd propose to change it (what Kernel uses today):

external @ExternalName("List_getLength")
int get length;

Or, if #28283 is fixed:

@ExternalName("List_getLength")
external int get length;

Please let me know what you think about this, and if you foresee any problems with this approach.

@rakudrama @a-siva @mhausner @sigmundch @kmillikin @asgerf @johnniwinther @stereotype441 @bwilkerson

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestfront-end-fastalegacy-area-front-endLegacy: Use area-dart-model instead.type-code-healthInternal changes to our tools and workflows to make them cleaner, simpler, or more maintainable

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions