Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by Ihor Malovanyi
Explaining Curiously Recurring Template Pattern in Swift
Let’s talk about CRTP in Swift! As a developer, you use some of the most common design patterns daily (сonsciously or not). But I want to explain to you one hidden but effective design pattern. The concept was described first in 1989 as F-bounded polymorphism. The primal idea is recursive type definitions and subtyping in object-oriented programming. If we view objects as elements of non-recursive record types, then bounded quantification provides a useful form of polymorphism over objects.
Introducing ErrorStream
/// `ErrorStream` is a utility to handle and stream error events asynchronously. /// /// ## Usage: /// /// ```swift /// // Add an error to the stream /// ErrorStream.add(MyError.someError) /// /// // Listen for updates in the stream /// Task { /// for await error in ErrorStream.updates { /// print("Received error: \(error)") /// } /// } /// ``` struct ErrorStream { /// A private static `NSLock` to ensure thread safety when accessing the continuations dictionary.
Handling a new URL parsing behavior in iOS 17
Apple's URL parsing implemented RFC1738/1808 standard and was changed to RFC3986 starting from iOS 17. This is what is contained in their old-version URL documentation: For apps linked on or after iOS 17 and aligned OS versions, parsing has updated from the obsolete RFC 1738/1808 parsing to the same RFC 3986 parsing as URLComponents. This unifies the parsing behaviors of the URL and URLComponents APIs. Now, URL automatically percent- and IDNA-encodes invalid characters to help create a valid URL.
Working with inout references in Swift
What do we know about function parameters in Swift? They can’t be modified because they are constants inside the function. This is true for the values but not for objects. If you pass a value to a function, it will be copied to a function, and you will not work with the original value inside.
Show More
loading
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with Ihor
Contact Ihor, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack