Thanks. I only skim the explainer and have 2 question.
Why name it thread? Shouldn't that make it ambiguous with multi-threading 🤔
Does async function inside subcript function will do automatic tracking? AFAIK in async effect, automatic tracking only happen before await syntax. All reactive variable will not get tracked after await syntax.
Full-time web tooling dude making cool concept cars for the web. I work on frameworks, compilers, CLIs and browser APIs. Currently building the world's most advanced Reactive Programming runtime!
In hind sight... thread() shouldn't be the best name for that function! I raised the first issue myself here: #5. Funny!
Thankfully, that should be only a name change! And it's entirely open to inputs, should you have something in mind! I once used the following reactive/react paradigms:
reactivefunctionrender(){// Function bodyconsole.log(externalVariable);}// Do first runrender();
That is in hopes that react() sounds better, being that what it does is really to let the function react to its external dependencies!
I might need more clarity on the particular question. But inside of Subscript Function is a great Automatic Dependency Tracking system - but this time - based on a compiler-generated Dependency Graph. (Here, calls to react() actually execute along the relationships in this Dependency Graph. And the chain of statements executed is called a dependency thread.)
Talking about async/await... Subscript functions could be async functions...
reactiveasyncfunctionrender(){// Function bodyletresult=awaitfetch(externalVariable).then(response=>response.json());console.log(result);}// Do first runrender();// Promise
Thanks. I only skim the explainer and have 2 question.
await
syntax. All reactive variable will not get tracked afterawait
syntax.References:
Valid questions!
thread()
shouldn't be the best name for that function! I raised the first issue myself here: #5. Funny!Thankfully, that should be only a name change! And it's entirely open to inputs, should you have something in mind! I once used the following
reactive/react
paradigms:That is in hopes that
react()
sounds better, being that what it does is really to let the function react to its external dependencies!Talking about
async/await
... Subscript functions could be async functions...Now, on the above update, the
console.log()
expression only executes after theawait fetch()
expression resolves - as it would normally!Code inside Subscript Functions do not change runtime expectations.