Skip to content

Will AS have support for pointers and references? #1228

Closed
@mpmartins

Description

@mpmartins

Hey guys,

I was just curious about this and I wanted to hear your thoughts.
Do you guys intend to add support for * and & to the language?

I understand that this might have consequences with the GC implementation and to TS Portability, but there are situations in which we need to call another application ABI and they take pointers as parameters.

See this example from Yuval Kohavi (@yuval-k) here:
https://github.com/solo-io/proxy-runtime/blob/master/assembly/runtime.ts#L207-L212
In order to make this work, he had to create a Reference object like so:
https://github.com/solo-io/proxy-runtime/blob/master/assembly/runtime.ts#L33-L39

This was a clever workaround, but do you guys intend to provide better syntax for such things? What are your thoughts about it?

Thanks,
Mario

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions