Hi everyone!
I feel so stupid right now, could anyone please tell me in a simple language
what does .closure. means and how it affected with .nimcall. ? : ) I EAGER TO
KNOW MORE : )
import actors
{.experimental: "codeReordering".}
app.settings.name = "Platypus"
app.settings.screen_size = (1920,1080)
app.scenes = newSeq[Scene](1)
app.scenes[0].callback = (start,update)
run()
proc start()=
discard
proc update()=
discard
Run
the thing is that if I won't put {.nimcall.} pragmas to the Scene.callback
tuple
Scene* = object
callback*: tuple[start: proc() {.nimcall.}, update: proc() {.nimcall.}]
Run
I won't be able to write
# without {.nimcall.} throughs error
app.scenes[0].callback = (start,update)
#but this is stil valid
app.scenes[0].callback.start = start
app.scenes[0].callback.update= update
Run