Skip to content

Instantly share code, notes, and snippets.

@pmurias
Created October 14, 2014 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmurias/e341037f5e8495aaf457 to your computer and use it in GitHub Desktop.
Save pmurias/e341037f5e8495aaf457 to your computer and use it in GitHub Desktop.
The transact commit/rollback thing seems like it declares a sort of mini slang.
# some things should be accesible inside the block so we use a is exposed to mark that
my $shared_by_all_transactions;
slang transact {
my $innards; # the transaction object we are building - created once per each transaction
my sub helper {...} # something
macro commit is exposed {...}
macro rollback is exposed {};
my sub this_one_is_visible_inside {
...;
}
}
The exact details/keywords/sugars haven't been thought out and should subject to bikeshedding before implementation ;)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment