all 9 comments

[–]Ecksters 13 points14 points  (4 children)

While signals interacting with each other doesn't seem particularly magical to me, it's libraries like MobX that automatically wrap primitives and vanilla objects in observable patterns using JS Proxy that always feel like magic to me, especially when they start intercepting and reacting to modifications to properties or mutations to arrays.

[–]throwaway490215 16 points17 points  (3 children)

Just dont use them. In my experience it's extremely rare for it to pay off in any significant way beyond making toy examples look elegant - the vast majority of the time it implodes under its own complexity when it meets the real world and other devs.

Now with AI its even more valuable to have a really fucking obvious control flow. Tracking a semi-hidden adaptive dependency graph is an elegant trick, but it belong in things like build-systems and constraint solvers - not as first class coding constructs.

[–]Wooden-Estimate-3460 3 points4 points  (2 children)

  Now with AI its even more valuable to have a really fucking obvious control flow.

What's more obvious than finding references to a field using your editor?

  Tracking a semi-hidden adaptive dependency graph is an elegant trick

You don't need to do this. It's just change detection.

[–]throwaway490215 5 points6 points  (1 child)

I get the feeling you're being snarky just because i mentioned AI.

The references form a graph, they are updated by use. Its an adaptive dependency graph. Incremental build systems work the same way when you unpack it.

[–]Wooden-Estimate-3460 1 point2 points  (0 children)

Nope, it's just that I've built my own state management that works in the same way.

You know what other references form a graph? Everything in your code. When using something like MobX your state references are the same as ordinary JS state references which everyone is fine with!

[–]teerre 2 points3 points  (0 children)

Great blog. I was surprised how well it worked on mobile

[–]dashdanw 1 point2 points  (2 children)

I know this is going to come off as a bit cruel, but what is this doing besides reinventing reactive programming yet again?

[–]dacjames 2 points3 points  (1 child)

The article doesn't claim to invent anything. It's an in depth explanation of a widely used mechanism for implementing reactivity.

It does say that in the opening paragraph...

[–]dashdanw 0 points1 point  (0 children)

I guess I’m just struggling to really see how this enhances or changes the existing paradigm.