<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Fundamentals on Abhishek Shukla</title><link>https://abhishekshukla.dev/tags/fundamentals/</link><description>Recent content in Fundamentals on Abhishek Shukla</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 30 Jun 2026 10:38:19 +0530</lastBuildDate><atom:link href="https://abhishekshukla.dev/tags/fundamentals/index.xml" rel="self" type="application/rss+xml"/><item><title>Mastering Equatable, Comparable, and Hashable in Swift</title><link>https://abhishekshukla.dev/blog/equatable-comparable-hashable/</link><pubDate>Mon, 29 Jun 2026 10:00:00 +0530</pubDate><guid>https://abhishekshukla.dev/blog/equatable-comparable-hashable/</guid><description>&lt;p&gt;When building applications in Swift, you constantly need to compare objects, sort arrays, or store unique items in a &lt;code&gt;Set&lt;/code&gt; or &lt;code&gt;Dictionary&lt;/code&gt;. To do this efficiently, Swift relies on three fundamental protocols: &lt;strong&gt;Equatable&lt;/strong&gt;, &lt;strong&gt;Comparable&lt;/strong&gt;, and &lt;strong&gt;Hashable&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;While these protocols are easy to adopt, their behavior differs significantly depending on whether you are using a &lt;code&gt;struct&lt;/code&gt; or a &lt;code&gt;class&lt;/code&gt;. Let&amp;rsquo;s break down why we need them and how to implement them correctly.&lt;/p&gt;</description></item><item><title>Demystifying Optionals in Swift: ?, !, and Under the Hood</title><link>https://abhishekshukla.dev/blog/swift-optionals/</link><pubDate>Mon, 29 Jun 2026 11:00:00 +0530</pubDate><guid>https://abhishekshukla.dev/blog/swift-optionals/</guid><description>&lt;p&gt;Swift is fundamentally designed to be a safe language, and one of its core safety features is how it handles the absence of values. In many languages, trying to access a null value leads to unexpected crashes. Swift solves this elegantly using &lt;strong&gt;Optionals&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;However, the differences between normal variables, Optionals (&lt;code&gt;?&lt;/code&gt;), and Implicitly Unwrapped Optionals (&lt;code&gt;!&lt;/code&gt;) often trip developers up. Let&amp;rsquo;s break down how they work, the dangers of misusing them, and even look under the hood by building our own Optional type from scratch.&lt;/p&gt;</description></item><item><title>Understanding Opaque Types in Swift and SwiftUI: The Power of `some`</title><link>https://abhishekshukla.dev/blog/swift-opaque-type/</link><pubDate>Tue, 30 Jun 2026 10:38:19 +0530</pubDate><guid>https://abhishekshukla.dev/blog/swift-opaque-type/</guid><description>&lt;p&gt;If you have ever written a single line of SwiftUI, you have seen this code:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-swift" data-lang="swift"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;var&lt;/span&gt; body: some View {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; Text(&lt;span style="color:#e6db74"&gt;&amp;#34;Hello, World!&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That tiny word—&lt;code&gt;some&lt;/code&gt;—represents one of the most powerful and complex features introduced in modern Swift: &lt;strong&gt;Opaque Return Types&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;But what exactly does &lt;code&gt;some&lt;/code&gt; do? Why can&amp;rsquo;t we just return &lt;code&gt;View&lt;/code&gt;? And when should you use opaque types in your own non-UI Swift code? Let&amp;rsquo;s break down the &lt;em&gt;what&lt;/em&gt;, &lt;em&gt;why&lt;/em&gt;, &lt;em&gt;where&lt;/em&gt;, and the common violations.&lt;/p&gt;</description></item></channel></rss>