It’s been a while since the last time I thought about traits and mixins in Swift, but the WWDC23 presentations about macros brought a lot of memories from those times when I really lamented not having that functionality in the language. Thankfully, Swift 5.9 gives us a form or meta-programming that allows us to get some basic support for mixins.
I’ve been very excited about memory ownership improvements to come to Swift, and now that they seem to materialize, I needed to share it with you. Specially because I feel this topic is very complex in people’s mind, and many will discard it as something only useful for experts, advanced uses or even “for nobody, Swift is getting too complex”.
When Apple released its own SwiftUI tutorial I decided to give it a try. This was not a simple tutorial introducing the basics of SwiftUI, but a more overarching training to know how to create a real application in SwiftUI. From custom UI to sharing data between and interacting with frameworks.
One of the major benefits of SwiftUI is its amazing DSL. A feature that not only makes it nice to read but also makes it possible to use the type system to unlock tremendous performance benefits. AnyView is a view that defies all of this, and although useful in very specific circumstances, you should always try to use a better alternative.
WWDC Monday finished! And what an evening! For the first time I was able to stay awake to watch the SotU live and it was great ^^ The problem is how then I spend a couple of hours playing with SwiftUI and time flew by.
Swift type system is quite powerful and the where clause is a very important part of how developers interface with it. This keyword allows developers to constraint code to a set of conditions. Swift 5.3 frees this keyword to be used in more contexts.
Swift 5.3 comes with a nice addition for enums: it will synthesize the required implementation to conform to the Comparable protocol. This reduces a lot the boilerplate needed to make your enums comparable.
PointFreehas released a library with their Composable Architecture and I’ve been showing it a little bit on livestreams and videos. This page wants to serve as an index and a summary for this content.
Publish’s Foundation theme is a very nice starter, but at some point you will want to accommodate it to your needs. When you start touching the CSS you will quickly notice that the workflow is far from ideal.
While developing the new version of my website with Publish I had the necessity of have live reloading of the page while developing. I’m happy with the solution I’ve found even if it’s not perfect.
I shared a very special video on my Following Swift Evolution video series the other day, Road to Swift 6! I think it’s an important moment to look at what the future of our beloved language looks like so I spend some time cleaning up a transcript of the video to have it posted in this blog, for posterity.
Last week I participated in the first Blackthornprod GAME JAM. I had so much fun creating a small game involving some mechanics that I wanted to explore for a while.
One thing that I always want to do is talk about WWDC before and after it happens. I used to do it when my podcast was active but without it I didn’t find the place or the time to give my opinions.
RxTesting makes testing a custom Rx operator an enjoyable experience. Being able to fake time simplifies a lot the develpemnt of reactive code and helps on building confidence in the code.
How flatMapLatest cancels an API request? This is a common question that people has when they start learning about Rx. Specially since RxSwift has an example of this in the README.
A while ago I wondered how easy would be to make a screenshot of a window in OS X from another application using some system API. With that idea in mind last Christmas I started a project that ended up being too time consuming.