News for hackers. Stuff that matters.
Re:Deno Cron by pseudosavant on Wednesday November 29, 2023 @11:15PM (#38469553)
Kind the point of Deno Deploy is that you never have to think about a unit like a VM or container.

The runtime shouldn’t allow you to mutate variables in a parent scope. It probably shouldn’t allow any shared context at all. Because it isn’t actually doing that.

Everything should be passed into the cron function as an argument. It seems like this should be more like the interaction with web workers where those clearly execute in their own context.

Re:Deno Cron by demosthanos on Thursday November 30, 2023 @12:20AM (#38469973)
> The runtime shouldn’t allow you to mutate variables in a parent scope. It probably shouldn’t allow any shared context at all. Because it isn’t actually doing that.

What you're proposing alters the semantics of JavaScript-the-language, which is outside the scope of the Deno project. Pretty much everyone is already in the habit of avoiding variables in the global scope. Why should they go to the trouble of redefining the semantics of JavaScript for something that is already widely understood?

Re:Deno Cron by pseudosavant on Thursday November 30, 2023 @04:19AM (#38471432)
`Deno.cron` isn't JavaScript-the-language. It is part of a runtime. They could implement this in a different way. Just like how Web Workers still just use JavaScrip-the-language, but within a different execution context than `<script>`.