TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

SwiftUI Defaults Considered Harmful

11 点作者 SoKamil2 个月前

4 条评论

latexr2 个月前
The webpage is nigh unreadable. A snowstorm, in March, over dark text on a dark background, with unstyled code.<p>Look for the snowflake on the top right and click it to restore the default look.
评论 #43252605 未加载
评论 #43252842 未加载
jacobp1002 个月前
The article is definitely wrong on the DSL being able to be replaced by some function call. You need to be able to do conditional rendering in a convenient way. The way SwiftUI’s DSL works means a lot of dynamic equality checks for updates can be statically resolved.<p>Also in terms of magic values, Apple’s UI doesn’t have a fixed set of spacing values they choose from. They’ll have padding of 14px and 15px all over the place. It’s not practical to expect a developer to get them all right. And of course, this behaviour is easily disabled just by providing explicit values.
dlachausse2 个月前
SwiftUI is excellent on iOS if you stay on the happy path. On macOS it needs a bit of work to get good results. It also has a built in escape hatch to UIkit when needed.
kuharich2 个月前
Past comments: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22413355">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22413355</a>