1. 一行代码的事,Web 为什么做了三十年还没做到

    在iOS上查询排版结果只需一行代码,Web上需要触发整个页面的重新布局。这不是因为浏览器工程师蠢,而是CSS在1994年做了一个声明式的架构选择。这个选择的天花板更高,但代价是中间状态不可查询。Facebook在2012年因为不理解这个trade-off付出了数亿美元的代价。SwiftUI和Jetpack Compose证明了声明式和可观测可以共存,关键在于分层。这个教训适用于所有系统设计:好的抽象让你选择在哪一层工作,坏的抽象把所有层粘在一起让你没得选。

  2. One Line of Code on Every Other Platform. Why Can't the Web Do It After 30 Years?

    Querying layout results takes one line of code on iOS, Android, Qt, and Flutter. On the web, it requires triggering a full-page reflow. This isn't because browser engineers are incompetent. CSS made a deliberate architectural choice in 1994 toward declarative layout, which has a higher ceiling but hides intermediate state. Facebook paid hundreds of millions of dollars in 2012 for not understanding this trade-off. SwiftUI and Jetpack Compose prove that declarative and observable can coexist through proper layering. The lesson applies to all system design: good abstractions let you choose which layer to work at; bad abstractions glue all layers together and leave you no choice.

Page 1 / 1