TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

SwiftUI Defaults Considered Harmful

11 pointsby SoKamil3 months ago

4 comments

latexr3 months ago
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 未加载
jacobp1003 months ago
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.
dlachausse3 months ago
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 months ago
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>