logoalt Hacker News

mpweiheryesterday at 8:28 AM1 replyview on HN

>> UI is also very much not functional,

> I disagree, and I believe that the complete stagnation of GUIs is due to ignoring this.

I disagree with your assessment.

>Description->Pack->Apply events->Generate assets->Render assets.

1. What does that even mean? I don't see a UI in there at all, at best some graphics (Render).

2. That's not "functional". If anything, it looks like a pipeline, so dataflow. But then again, see (1)

3. Not sure why reification, that is turning things into objects, is functional to you. Reification, that is turning things into objects, is object-oriented.

4. MVC was actually created on 5.8 MHz machines with 128KB of RAM (including the display buffer). And still works beautifully today.

https://en.wikipedia.org/wiki/Xerox_Alto


Replies

bsderyesterday at 9:15 AM

Functional is all about reification. You take a set of things in, you apply/map/collect/fold/whatever, you eject a set of things out. That is 100% functional--every time you supply the same inputs you get exactly the same outputs. The point of functional programming is that you avoid mutation and hidden state.

And, um, side note: dataflow programming is almost always considered functional programming.

Object oriented, by contrast, is all about hidden state and mutation. I send a message or call a function on that object over there and fingers wiggle and magic happens. But I don't know what or when or even if it actually happened.

And increasing evidence suggests that MVC doesn't work beautifully today because it doesn't parallelize, and it scatters state between uncooperative things. Just ask every single GUI that exists--every single one hangs because somebody made an oops and put too much work on the single, blessed primary thread. Or they have janky scroll. Or resizes leave gunk on the screen. Or your system flashes and jiggles because it's too busy reflowing everything in the universe. Or ...

show 1 reply