frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Objective C Devs: How hard was it to switch to Swift?

3•tolarewaju3•7h ago
My app is written in objective c and has been for years. Obviously a lot of libraries are only being created in Swift. I know that eventually I'm going to have to change, but I'm curious as to how hard that was

Comments

sherdil2022•7h ago
What is your app?

Swift is a breeze compared to Objective C. Instead of conversion, consider rewriting it from scratch using Swift.

tolarewaju3•7h ago
It's a real-world game to beat social anxiety called Roadmap. It's not super complex. Here are the main technologies I'm using.

AWS DynamoDB

AWS Cognito

AWS Lambda for AI calls

Cocoa Control libraries for showing players challenges, progress, and unlocks

OneSignal Push Notifs to notify players of changing game state

I know that all of these have Swift libraries or probably some similar ones. And I've written some swift code. But I'm just wondering about the syntax shift or other gotchas that I may not be thinking about. Even things like connecting to the storyboard seem like they might have minor differences

ben_w•6h ago
Storyboard is probably the closest to a gotcha, because all the views have to be optionals, even though your code will never see them in a nil state. This is the only sensible case I've seen for swift to have implicitly unwrapped optionals (that's the ones declared with a !)
ben_w•6h ago
Fairly easy. The language itself is an improvement, the hardest part was the correct use of ?, ??, and !, which isn't that hard.

Lots of the kind of mistake one can make in ObjC and only notice at runtime, get caught at compile time in swift.

The frameworks are more of a mess: SwiftUI is something I want to like, but mostly gets in the way. There's now too many different ways to do background tasks, all promising to solve everything.

But you can still use UIKit and GCD, and I prefer to when I can.

Apple Says Fortnite for iOS Isn't Blocked Worldwide, Just the U.S.

https://www.macrumors.com/2025/05/16/apple-fortnite-ios-not-blocked-worldwide/
2•smileybarry•2m ago•0 comments

Typograph: Prompt to Font

https://typograph.studio/en
1•handfuloflight•5m ago•0 comments

Harvard bought a Magna Carta copy for $27. It turned out to be an original

https://www.usatoday.com/story/news/nation/2025/05/15/harvard-magna-carta-1300/83643266007/
1•rmason•11m ago•0 comments

Core War

https://en.wikipedia.org/wiki/Core_War
1•michalpleban•12m ago•0 comments

Reddit is down

2•tom1337•13m ago•0 comments

Yeast-Based LLM Research

1•daly•13m ago•0 comments

Berkshire Hathaway Inc Q4 2024 vs. Q1 2025 13F Holdings Comparison

https://13f.info/13f/000095012325005701-berkshire-hathaway-inc-q1-2025
1•kamaraju•14m ago•0 comments

How to Split Ranges in C++23 and C++26

https://www.cppstories.com/2025/ranges_split_chunk/
2•ibobev•19m ago•0 comments

Leica M10 Battery Teardown and Reverse Engineering

https://tokilabs.co/tech/
1•k2enemy•20m ago•0 comments

The Digital Panopticon Nightmare

https://www.thedissident.news/the-digital-panopticon-nightmare/
3•anigbrowl•22m ago•0 comments

Ask HN: Did anyone else see an avalanche of old email appear in Gmail?

1•DamnInteresting•23m ago•0 comments

Party Till the Break of 10 P.M

https://www.nytimes.com/2025/05/15/style/earlybirds-club-dance-party.html
2•whack•25m ago•0 comments

On-Demand: AI Agent Automation

https://on-demand.io/
1•handfuloflight•27m ago•0 comments

U.S. Loses Last Triple-A Credit Rating

https://www.wsj.com/economy/central-banking/u-s-loses-last-triple-a-credit-rating-bfcbae5d
7•mudil•30m ago•1 comments

FDA clears first blood test for diagnosing Alzheimer's

https://www.statnews.com/2025/05/16/alzheimers-fujirebio-fda-approval/
1•pseudolus•30m ago•0 comments

Really Really Simple "Pure CSS" Squircles

https://gist.github.com/pouyakary/136fafc75a14abd867e0100856add5a0
3•pmkary•33m ago•0 comments

After HTTPS: Indicating Risk Instead of Security (2019)

https://scholarsarchive.byu.edu/etd/7403/
2•transpute•34m ago•0 comments

Our Idea of Happiness Has Gotten Shallow

https://www.nytimes.com/2025/05/03/magazine/happiness-history-living-well.html
1•gmays•39m ago•0 comments

Dept Homeland Security in vetting process for immigrant reality TV show

https://www.cnn.com/2025/05/16/politics/dhs-vetting-immigrant-reality-tv-show
3•jeffwass•39m ago•0 comments

HMPL v3.0: Small template language for displaying UI from server to client

https://github.com/hmpl-language/hmpl/releases/tag/3.0.0
3•todsacerdoti•41m ago•0 comments

Peter Lax, Pre-Eminent Cold War Mathematician, Dies at 98

https://www.nytimes.com/2025/05/16/science/peter-lax-dead.html
3•donohoe•41m ago•1 comments

Beyond the Gang of Four: Practical Design Patterns for Modern AI Systems

https://www.infoq.com/articles/practical-design-patterns-modern-ai-systems/
1•rbanffy•42m ago•0 comments

AI Could Help Humans Understand Animals

https://nautil.us/ai-could-help-humans-understand-animals-1211108/
1•rbanffy•42m ago•0 comments

Slopaganda

https://dbushell.com/2025/05/15/slopaganda/
4•ambigious7777•43m ago•0 comments

Implementing a Toy Optimizer (2022)

https://pypy.org/posts/2022/07/toy-optimizer.html
2•grep_it•49m ago•0 comments

Why are Truffles so expensive? Are they worth it? [video]

https://www.youtube.com/watch?v=KKddfnuQtd4
2•lawrenceyan•54m ago•0 comments

SDL3 examples: Full game and app demos

https://examples.libsdl.org/SDL3/demo/
3•xeonmc•55m ago•0 comments

Amazon-owned Zoox issues recall following robotaxi crash

https://techcrunch.com/2025/05/06/amazon-owned-zoox-issues-recall-following-robotaxi-crash/
3•PaulHoule•56m ago•0 comments

China Drops to No. 3 Holder of Treasuries, Falling Behind UK

https://www.bloomberg.com/news/articles/2025-05-16/china-falls-to-no-2-holder-of-treasuries-with-uk-on-the-rise
5•JumpCrisscross•57m ago•0 comments

Mice grow bigger brains when given this stretch of human DNA

https://www.nature.com/articles/d41586-025-01515-z
3•bookofjoe•58m ago•2 comments