Question about Suspendible Workflow example

I stumbled across this which contains a neat pattern I could currently use. However I’m getting
type error [M0077], a shared function is only allowed as a public field of an actor (This is a limitation of the current version.) at compile.

Is this still a planned feature?

1 Like

You mean this line, right?

This is returning an anonymous shared function that closes over some local data.

Yeah, it’s unlikely we will support that any time soon, though its actually related to the discussion on thunks here. We would need both private entry points (not supported by the IC) and, ideally, unforgeable closures as candid values.

Curiously, this is related to @rossbergs suggestions here

1 Like

Apologies should have included the link! Yes thats the one.

Lots of fun technical challenges :grinning_face_with_smiling_eyes: . Would be wonderful to have in the future but I don’t think it’s 100% necessary.