(评论)
(comments)

原始链接: https://news.ycombinator.com/item?id=43682984

一篇 Hacker News 的帖子询问在 2025 年是否可以编写一个纯 C 语言的 iOS 应用,并参考了一个旧项目作为灵感。评论区里普遍认为这是可行的,但有一些限制。一位评论者认为这类似于编写一个无 nib 的 Objective-C 应用,并手动将调用转换为 `objc_msgSend`,承认完全避免 Objective-C 运行时是不太可能的。另一位评论者认为性能考虑可能是这种尝试的主要动机。第三位用户质疑将性能作为唯一原因的关注点。有人鼓励原作者尝试一下,建议链接的项目提供了一个很好的起点。

一篇 Hacker News 的帖子询问在 2025 年是否可以编写一个纯 C 语言的 iOS 应用,并参考了一个旧项目作为灵感。评论区里普遍认为这是可行的,但有一些限制。一位评论者认为这类似于编写一个无 nib 的 Objective-C 应用,并手动将调用转换为 `objc_msgSend`,承认完全避免 Objective-C 运行时是不太可能的。另一位评论者认为性能考虑可能是这种尝试的主要动机。第三位用户质疑将性能作为唯一原因的关注点。有人鼓励原作者尝试一下,建议链接的项目提供了一个很好的起点。
相关文章
  • (评论) 2025-03-14
  • (评论) 2025-03-25
  • (评论) 2025-02-21
  • (评论) 2025-03-27
  • (评论) 2024-09-14

  • 原文
    Hacker News new | past | comments | ask | show | jobs | submit login
    Is it possible to write plain C iOS app in 2025?
    10 points by iMario 2 hours ago | hide | past | favorite | 4 comments
    I know this has been lately decaying.. most referenced are very old, such as this one: https://github.com/richardjrossiii/CBasediOSApp

    Hence my question: Is it possible?











    Yes, it's basically writing a nibless objective-c application but manually translating all invocations to objc_msgsend yourself. You're not going to be able to avoid the objective-c runtime though.


    Definitely. Just find a use case where you need the performance


    Why do you focus on "performance" here?


    Give it a shot. The project you linked to, despite being old seems like it'd get you most of the way there.






    Join us for AI Startup School this June 16-17 in San Francisco!


    Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact



    Search:
    联系我们 contact @ memedata.com