Deciding between a computed property and a function in Swift

  Рет қаралды 440

donny wals

donny wals

13 күн бұрын

In this video we explore Swift's computed properties and I talk about the different things I consider when deciding which type of property I should use.
This video is a companion video for: www.donnywals.com/deciding-be...
Level up your Swift Concurrency skills with my course: donnyplus.com/p/practical-swi...

Пікірлер: 8
@srzurka
@srzurka 11 күн бұрын
Thanks for the video. I concur. I would only add that, computed properties feel Swifty to me so I start with a bias towards using them, then change to a function when there's one of the situations that you've identified. (needs arguments, it's not lightweight, potential side-effects, etc)
@tiagoalexbastos
@tiagoalexbastos 11 күн бұрын
your videos are so good man, top tier content! Keep it up :)
@DonnyWalsdev
@DonnyWalsdev 11 күн бұрын
Thanks!!!
@nigelgee3576
@nigelgee3576 11 күн бұрын
I know that you are using person name as an example code. But it should said that when dealing with with names that should use PersonNameComponentsFormatter as this will put the correct format for user locale
@user-qg8nc5bk4p
@user-qg8nc5bk4p 11 күн бұрын
Sound became better :) Could you please share your thoughts on usage of extensions, e.g. extending models with some methods, formatting methods etc. When an object that does something is better than extension of some model that handles the model certain way and returns the data I need, the only think that comes to my mind is inability to use DI in extension, so testability is limited for these functionality
@DonnyWalsdev
@DonnyWalsdev 4 күн бұрын
I've added it to my (long) list of potential topics!
@alexandr8328
@alexandr8328 11 күн бұрын
Hello! When is your Swift Concurrency course released? It says it is still in progress. Thx
@DonnyWalsdev
@DonnyWalsdev 4 күн бұрын
Hey! The course should be finished in the next week or two. Plan was to have it fully done this week but I'm currently at a conference so that seems a little too ambitious. Almost all sections are finished except for the final one on TaskGroup and async let.
Quicksort: Partitioning an array
4:48
KC Ang
Рет қаралды 573 М.
Binding vs. Bindable in SwiftUI on iOS 17
13:12
donny wals
Рет қаралды 8 М.
The Noodle Stamp Secret 😱 #shorts
00:30
Mr DegrEE
Рет қаралды 59 МЛН
Normal vs Smokers !! 😱😱😱
00:12
Tibo InShape
Рет қаралды 84 МЛН
An introduction to JSON Parsing in Swift
16:44
donny wals
Рет қаралды 657
Learn Big O Notation In 12 Minutes
12:18
Web Dev Simplified
Рет қаралды 180 М.
Writing code that makes mistakes harder
14:43
donny wals
Рет қаралды 553
Comparing @Observable to ObservableObjects in SwiftUI
12:57
donny wals
Рет қаралды 1 М.
How to determine where code runs in Swift Concurrency
12:42
donny wals
Рет қаралды 1,7 М.
Actor Reentrancy in Swift explained
20:18
donny wals
Рет қаралды 635
Using Closures as Dependencies
15:18
donny wals
Рет қаралды 1 М.
Sodium-ion batteries in the USA. Beating China at their own game!
12:52
Just Have a Think
Рет қаралды 48 М.
Five tips and tricks for exploring a new codebase
11:29
donny wals
Рет қаралды 300
О, сосисочки! (Или корейская уличная еда?)
0:32
Кушать Хочу
Рет қаралды 6 МЛН
Gosta de PIZZA??? 🍕
0:38
F L U S C O M A N I A
Рет қаралды 30 МЛН
顔面水槽がブサイク過ぎるwwwww
0:58
はじめしゃちょー(hajime)
Рет қаралды 107 МЛН