Skip to content

Navigation Menu

Sign in
Sign up

feat: Add unrolling and rolling #98

Open
Open
Assignees

Description

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 
 }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

  • Status
    Todo Later

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    AltStyle によって変換されたページ (->オリジナル) /