Top Tweets for #100daysofproswift
Day 45 of #100DaysOfPROSwift
Super-charge your data processing with concurrent mapping via TaskGroup ⚡️
Instead of this:
😬 Traditional loop, one network call at a time
var images: [UIImage] = []
for url in urls {
if let img = try? await fetchImage(url) {
images.append(img)
}
}
Do this:
let images = try await withTaskGroup(of: UIImage?.self) { group in
for url in urls {
group.addTask { try? await fetchImage(url) }
}
return try await group.compactMap { $0 }
}
✅ Parallel fetches, same readable structure
Swift’s structured concurrency lets you launch many child tasks safely inside withTaskGroup, then gather the results with a single await.
☛ Automatic cancellation & error propagation
☛ Bounded scope – tasks can’t leak outside the group
☛ Performance boost for I/O-heavy work (network, disk, JSON)
💡 When you need fast, ordered‐agnostic processing of many async operations, reach for TaskGroup instead of serial loops.
If this was helpful, feel free to ❤️ or 🔁
#swift #ios #macos
Day 43 of #100DaysOfPROSwift
Use Swift’s new native Regex for powerful pattern matching 🧠
Instead of this:
let range = text.range(of: "[a-z]+", options: .regularExpression)
Do this:
if let match = try? /[a-z]+/.firstMatch(in: text) {
// use match
}
✅ Native syntax, no stringly-typed regex mess
Swift’s built-in Regex lets you write patterns directly with /slashes/, safely and concisely.
☛ Compile-time checked patterns
☛ Type-safe captures
☛ Cleaner, Swifty syntax
💡 Use Swift Regex when you need precision and safety in pattern matching
If this was helpful, feel free to ❤️ or 🔁
#swift #ios #macos
Day 2 of #100DaysOfPROSwift
Day 2 of #100DaysOfPROSwift
Order matters with &&
Swift evaluates conditions left to right — and stops as soon as it finds false.
That’s called short-circuiting.
if a() && b() { ... }
☛ If a() is false, b() is never called
☛ If b() is slow, put the fastest or most likely to fail check first
☛ Avoid calling expensive logic when it’s unnecessary
💡 Use this to your advantage in performance-sensitive branches.
Write if conditions like they cost real money — because sometimes they do.
If this was helpful, feel free to ❤️ or 🔁
#swift #ios #macos

Day 2 of #100DaysOfPROSwift
Order matters with &&
Swift evaluates conditions left to right — and stops as soon as it finds false.
That’s called short-circuiting.
if a() && b() { ... }
☛ If a() is false, b() is never called
☛ If b() is slow, put the fastest or most likely to fail check first
☛ Avoid calling expensive logic when it’s unnecessary
💡 Use this to your advantage in performance-sensitive branches.
Write if conditions like they cost real money — because sometimes they do.
If this was helpful, feel free to ❤️ or 🔁
#swift #ios #macos

Day 1 of #100DaysOfPROSwift
Day 1 of #100DaysOfPROSwift
Struct vs Class
Structs are value types — copied on assignment.
Classes are reference types — shared by reference.
✅ Use struct when you want:
☛ Performance (stack allocation)
☛ Predictability (no shared mutation)
☛ Safer concurrency
⚠️ Use class only when:
☛ You need identity
☛ Shared mutable state is necessary
☛ You’re leveraging inheritance (rare in modern Swift)
💡 Swift encourages structs, but the right choice depends on your data model.
Don’t blindly default — choose with intent.
#swift #ios #macos

Day 1 of #100DaysOfPROSwift
Struct vs Class
Structs are value types — copied on assignment.
Classes are reference types — shared by reference.
✅ Use struct when you want:
☛ Performance (stack allocation)
☛ Predictability (no shared mutation)
☛ Safer concurrency
⚠️ Use class only when:
☛ You need identity
☛ Shared mutable state is necessary
☛ You’re leveraging inheritance (rare in modern Swift)
💡 Swift encourages structs, but the right choice depends on your data model.
Don’t blindly default — choose with intent.
#swift #ios #macos

Last Seen Hashtags on Sotwe
AnnaIsBoss
Seen from Indonesia
بچیاں
Seen from United States
Consolidatedbank
Seen from United States
วาปสาวสวย
Seen from Thailand
PacksPremium
filipponeviani
Seen from United States
jellysting
Seen from Indonesia
نيج_عراقية
Seen from United Kingdom
tudungbasah
Seen from Malaysia
タイムチケッ���
Seen from Indonesia
Most Popular Users

Elon Musk 
@elonmusk
239.6M followers

Barack Obama 
@barackobama
118.5M followers

Cristiano Ronaldo 
@cristiano
114.3M followers

Donald J. Trump 
@realdonaldtrump
111.7M followers

Narendra Modi 
@narendramodi
106.9M followers

Rihanna 
@rihanna
98.6M followers

NASA 
@nasa
92.1M followers

Justin Bieber 
@justinbieber
91.7M followers

KATY PERRY 
@katyperry
89.9M followers

Taylor Swift 
@taylorswift13
83.9M followers

Lady Gaga 
@ladygaga
75.4M followers

Virat Kohli 
@imvkohli
73.3M followers

Kim Kardashian 
@kimkardashian
70.8M followers

YouTube 
@youtube
68.6M followers

Neymar Jr 
@neymarjr
66.3M followers

Bill Gates 
@billgates
65.1M followers

Selena Gomez 
@selenagomez
63M followers

The Ellen Show
@theellenshow
62.1M followers

CNN 
@cnn
61.7M followers

X 
@x
60.6M followers
