克劳德是一个Electron应用,因为我们失去了原生能力。
Claude is an Electron App because we've lost native

原始链接: https://tonsky.me/blog/fall-of-native/

德鲁·布鲁尼格质疑,尽管大型语言模型有潜力自动化大量的开发工作,像Claude这样的应用仍然选择Electron而不是原生开发。他认为这并非仅仅因为大型语言模型尚未足够完善。 他认为核心问题在于,如今原生开发几乎没有优势。原生API使用起来很繁琐,操作系统供应商也在积极阻止原生开发,平台一致性已经成为不可能,现代原生UI往往和基于Web的UI一样糟糕,甚至更糟,不断变化且缺乏明确的指导原则。 虽然更深层次的操作系统集成听起来很有吸引力,但实际的互操作性有限,大多数服务都在向线上迁移。性能也无法保证;臃肿软件并非Web应用独有。最终,作者认为问题不在于*技术*(Electron或原生),而是软件开发中普遍缺乏细致和质量控制。简单地用原生框架重写应用并不能神奇地解决根本问题。

一个 Hacker News 的讨论集中在将 Claude 构建为 Electron 应用的决定上,引发了关于软件开发选择的争论。作者的理由——跨平台一致的用户界面,特别是 Mac 窗口样式——受到了质疑,因为 Electron *使用*了原生窗口元素。 许多评论员抱怨 Electron 的盛行,将其归因于开发者的懒惰和缺乏原生开发能力。有人建议使用 Tauri(使用 Rust)等替代方案以获得更好的性能。 对话还涉及更广泛的趋势:从“软件作为工艺”向“软件作为批量产品”的转变,JavaScript 的主导地位,以及 LLM 驱动的开发可能更倾向于更高效、静态类型的语言。有些人甚至认为,由于 AI 需求导致的硬件限制可能会激励开发更高效的软件。然而,一位评论员赞赏 Electron 的 Linux 支持,这在原生开发中常常被忽视。最后,也有人表达了对苹果公司自己的一些原生 macOS 应用性能的沮丧。
相关文章

原文

In “Why is Claude an Electron App?” Drew Breunig wonders:

Claude spent $20k on an agent swarm implementing (kinda) a C-compiler in Rust, but desktop Claude is an Electron app.

If code is free, why aren’t all apps native?

And then argues that the answer is that LLMs are not good enough yet. They can do 90% of the work, so there’s still a substantial amount of manual polish, and thus, increased costs.

But I think that’s not the real reason. The real reason is: native has nothing to offer.

API-wise, native apps lost to web apps a long time ago. Native APIs are terrible to use, and OS vendors use everything in their power to make you not want to develop native apps for their platform. That explains the rise of Electron before LLM times, but it’s also a problem that LLMs solve now: if that was a real barrier to developing native apps, it doesn’t exist anymore.

Then there’re looks and consistency. Some time ago, maybe in the late 90s and 2000s, native was ahead. It used to look good, it was consistent, and it all actually worked: the more apps used native look and feel, the better user experience was across apps (which we used to call programs).

These days, though, native is as bad as the web, if not worse. Consistency is basically out the window. Anything can look like anything, buttons have no borders, contrast doesn’t exist, and neither do conventions. Apple, for example, seems to place traffic lights and corner radius by vibes rather than by any measurable guidelines.

Maybe the server should round the corners?

Looks could be good, but they also can be bad, and then you are stuck with platform-consistent, but generally bad UI (Liquid Glass ahem). It changes too often, too: the app you made today will look out of place next year, when Apple decides to change look and feel yet again. There’s no native look anymore.

Computer UIs also degrade over time

Theoretically, native apps can integrate with OS on a deeper level. This sounds nice, but what does that mean in practice? There are almost no good interoperable file formats; everything is locked inside individual apps, most services moved to the web, and OSes dropped the ball for making a good shared baseline. You can integrate with OS-provided calendar, but you can’t do it with web calendar. Well, you can, of course, but it’s easier on the web; native doesn’t help with it at all.

Web pages only lead to more web pages

Finally, the last hope of people longing for native is performance. They feel that native apps will be faster. Well, they can, but it doesn’t mean they will. Web apps can be faster, too, but in practice, nobody cares. There’s no technical reason why Slack needs to load 80 MiB just to show 10 channel names and 3 messages on a screen. The web is not the problem here! It’s a choice to be bad. What makes you think it’ll be different once the company decides to move to native?

Don’t get me wrong: writing this brings me no joy. I don’t think web is a solution either. I just remember good times when native did a better-than-average job, and we were all better for using it, and it saddens me that these times have passed.

I just don’t think that kidding ourselves that the only problem with software is Electron and it all will be butterflies and unicorns once we rewrite Slack in SwiftUI is not productive. The real problem is a lack of care. And the slop; you can build it with any stack.

联系我们 contact @ memedata.com