<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Bernadette Akinyi</title>
    <description>The latest articles on DEV Community by Bernadette Akinyi (@bernadetteakinyi).</description>
    <link>https://dev.to/bernadetteakinyi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4027622%2F22bb9cb9-6061-402a-aad2-4f7503b5e572.jpg</url>
      <title>DEV Community: Bernadette Akinyi</title>
      <link>https://dev.to/bernadetteakinyi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bernadetteakinyi"/>
    <language>en</language>
    <item>
      <title>Slices Beyond the Basics</title>
      <dc:creator>Bernadette Akinyi</dc:creator>
      <pubDate>Thu, 23 Jul 2026 15:45:59 +0000</pubDate>
      <link>https://dev.to/bernadetteakinyi/slices-beyond-the-basics-4ohd</link>
      <guid>https://dev.to/bernadetteakinyi/slices-beyond-the-basics-4ohd</guid>
      <description>&lt;h3&gt;
  
  
  Hey Techie! 🌸
&lt;/h3&gt;

&lt;p&gt;Welcome to my Go series! I'll be sharing what I'm learning in ways that make sense to me, the mistakes I make and the "aha!" moments that help everything click. Whether you're learning Go too or just curious about it, I hope you'll pick up something along the way.&lt;/p&gt;

&lt;p&gt;Feel free to add any insights or experiences in the comments.&lt;/p&gt;

&lt;p&gt;Today's topic is... &lt;em&gt;drumroll, please!&lt;/em&gt; &lt;strong&gt;Slices&lt;/strong&gt;. Let's dive in!&lt;/p&gt;

&lt;h2&gt;
  
  
  So, what exactly is a slice?
&lt;/h2&gt;

&lt;p&gt;When I first came across slices in Go, I thought they were another name for arrays. Turns out, they're not!&lt;/p&gt;

&lt;p&gt;A slice is a dynamic view into an underlying array. It is internally represented by a small data structure called a &lt;strong&gt;slice header&lt;/strong&gt;. Instead of storing the elements themselves, the slice header stores a &lt;strong&gt;pointer&lt;/strong&gt; to the underlying array, along with its &lt;strong&gt;length&lt;/strong&gt; and &lt;strong&gt;capacity&lt;/strong&gt;. This realization helped me understand why modifying a slice can also modify the original array.&lt;/p&gt;

&lt;p&gt;Another interesting and convenient thing is how flexible slices are compared to arrays which are fixed size. Slices can grow using functions like &lt;strong&gt;append()&lt;/strong&gt; or be resliced to work with a smaller portion of the underlying array. This flexibility is one of the reasons slices are used so frequently in Go.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>go</category>
      <category>discuss</category>
      <category>software</category>
    </item>
  </channel>
</rss>
