Settings

Theme

Show HN: Jactl – open-source, secure, non-blocking script language for Java

github.com

5 points by jaccomo · 2 comments

Reader

1 thread
gus_massa

> When a blocking operation is invoked, Jactl creates a Continuation object that captures the state of the running script such as the value of all local variables and the current call stack. When the long-running operation completes, the script state is restored and the script continues from where it left off.

I don't understand this. Is it possible that some code runs twice? (I know continuations from Racket/Scheme, but perhaps I'm misunderstanding the implementation.)

  a = slow(7)
  print(5)
  somethingelse()
  print(a)
Can 5 be printed twice?
  • jaccomoOP

    The continuation is only invoked once when a blocking operation completes so the print(5) would only be run once.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection