Live data from Hacker News

WasmFX: Effect Handlers for WebAssembly

wasmfx.dev

1–10 of 44 posts

Re: WasmFX: Effect Handlers for WebAssembly

#3
I first heard of algebraic effects in a presentation about Unison recorded at Strangeloop. Realizing that exceptions, async, generators, and continuations could all be unified and implemented on top of one language feature was mind expanding.

It looks like the juicy details are in the Explainer:

https://github.com/WebAssembly/stack-switching/blob/main/pro...

Re: WasmFX: Effect Handlers for WebAssembly

#5

WebAssembly is getting more complex bit by bit...

That's okay; _using_ WebAssembly is getting easier bit by bit. Features like this one allow the high level programming language features you know and love to be implemented efficiently behind the scenes.

Re: WasmFX: Effect Handlers for WebAssembly

#8

I first heard of algebraic effects in a presentation about Unison recorded at Strangeloop. Realizing that exceptions, async, generators, and continuations could all be unified and implemented on top of one language feature was mind expanding. It looks like the juicy details are in the Explainer: https://github.com/WebAssembly/stack-switching/blob/main/pro...

Algebraic effect and delimited continuations have equivalent power. I think, for example, GHC added delimited continuations, in part, because they made it easier to implement algebraic effects efficiently.

Re: WasmFX: Effect Handlers for WebAssembly

#9

WebAssembly is getting more complex bit by bit...

That's okay; _using_ WebAssembly is getting easier bit by bit. Features like this one allow the high level programming language features you know and love to be implemented efficiently behind the scenes.

But they make making WASM implementations harder to make.

Re: WasmFX: Effect Handlers for WebAssembly

#10

I first heard of algebraic effects in a presentation about Unison recorded at Strangeloop. Realizing that exceptions, async, generators, and continuations could all be unified and implemented on top of one language feature was mind expanding. It looks like the juicy details are in the Explainer: https://github.com/WebAssembly/stack-switching/blob/main/pro...

The problem with abstracting control flow has always been the ease of composition within a program. I'm not sure if algebraic effects make that better, although I like the simplest form (exceptions with resume) for error handling.

It's kind of like abelian groups and hyper graphs. They generalize many domains very nicely, and are an attractive abstraction. But it turns out they're too abstract for any individual domain, and don't make life easier. The PL world seems to have learned that lesson from call/cc, but I don't know if they've reached it yet with algebraic effects - although it seems looming.

Control flow is sexy for PL researchers, so it makes sense why it's hot right now. Faster matrix multiplications are much more boring, no matter how much better they make society than weird control flow.

Just personally, I can count on one hand the number of algorithms I've written where weird control flow was necessary to make the algorithm easier, and they were all weird shit that I expect other people to use libraries for in most cases.

Post reply on HN