Skip to content

feat: Add unrolling and rolling #98

@Zffu

Description

@Zffu

Introduce a system of "handlers" whenever a specific type is created or freed / goes out of scope. This system is called unrolling and rolling.

This could be registered within a struct, layout or an enum. The rolling handler is triggered whenever an instance of the given type is created in any way shape or form (if the creation doesn't have the fast operator attached to it). The unrolling handler is triggered whenever an instance of the given type goes out of scope in any way shape or form.

Example Code

struct myStruct {
    s32 myInt
    bool myBool

    roll(this) {
        // Do stuff with the created instance here
    }

    unroll(this) {
      // Do stuff to handle the unrolling of the instance here 
    }

Metadata

Metadata

Assignees

Projects

Status

Todo this release

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions