Skip to content

Feature: delete keyword proposal #1

@john-bv

Description

@john-bv

Delete would remove an object or identifier from memory.
Use case:

const somethingNoLongerUsed: int = 10;

delete somethingNoLongerUsed;

However, this comes with a side effect:

const myObject: Obj = {};
const myReference: Obj = Obj;
delete myObject;
print!(myReference); // Dangling pointer, pointing to unknown reference

I plan on having built in memory safety, similar to rust, but at the compile level. However this is still an issue with delete.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help WantedExtra attention is neededquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions