<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/immutability-in-ballerina-part-ii-o7moiu5yj" -->

---
title: Immutability in Ballerina — Part II | daily.dev
description: This post explores the concept of immutability in Ballerina, specifically focusing on immutable mapping fields, using records with immutable fields in tables,...
canonical: https://daily.dev/posts/immutability-in-ballerina-part-ii-o7moiu5yj
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Immutability in Ballerina — Part II | daily.dev
og:description: This post explores the concept of immutability in Ballerina, specifically focusing on immutable mapping fields, using records with immutable fields in tables,...
og:url: https://daily.dev/posts/immutability-in-ballerina-part-ii-o7moiu5yj
og:image: https://api.daily.dev/og/posts/o7MOIU5YJ.png
og:image:alt: Immutability in Ballerina — Part II
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Immutability in Ballerina — Part II

**[Ballerina](https://daily.dev/sources/ballerina)** · 10 min read · 0 upvotes · 0 comments

## Summary

This post explores the concept of immutability in Ballerina, specifically focusing on immutable mapping fields, using records with immutable fields in tables, and creating immutable fields via the mapping constructor. It also discusses typing with immutable mapping fields and the difference between immutable fields and fields of immutable types. Additionally, the post covers final object fields, typing with final object fields, and the concept of immutable classes in Ballerina.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/ballerina-techblog/immutability-in-ballerina-part-ii-63f1eba39c6f>

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#ballerina](https://daily.dev/tags/ballerina)

[View this post on daily.dev](https://daily.dev/posts/immutability-in-ballerina-part-ii-o7moiu5yj)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Immutability in Ballerina — Part II","url":"https://daily.dev/posts/immutability-in-ballerina-part-ii-o7moiu5yj","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/immutability-in-ballerina-part-ii-o7moiu5yj"},"datePublished":"2024-04-03T03:13:42.326Z","dateModified":"2024-05-09T09:06:08.895Z","description":"This post explores the concept of immutability in Ballerina, specifically focusing on immutable mapping fields, using records with immutable fields in tables,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/720dd89fdb165d5479480c08256c047c?_a=AQAEufR","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/720dd89fdb165d5479480c08256c047c?_a=AQAEufR","isAccessibleForFree":true,"articleSection":"Ballerina","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Ballerina","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/958d0f92bff045eba8128ea4fac00fb4","url":"https://daily.dev/sources/ballerina"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/immutability-in-ballerina-part-ii-o7moiu5yj","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ballerina","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Ballerina","item":"https://daily.dev/sources/ballerina"},{"@type":"ListItem","position":3,"name":"Immutability in Ballerina — Part II"}]}
```

