From Kotlin and Go to Clojure: 8 months at Nubank

Migration experience to Lead Software Engineer at Nubank: I compare Go, Kotlin, and Clojure in greeting, data transformation, and concurrency challenges, with technical reflections and about Q2BSTUDIO.

domingo, 17 de agosto de 2025 • 3 min read • Q2BSTUDIO Team

Artificial-Intelligence-

Hello, team and readers

8 months ago I started the transition to Lead Software Engineer at Nubank. I came from an environment dominated by Kotlin and Go, and learning Clojure meant a paradigm shift. Here I share the experience in Spanish, showing in words and fragments the differences and what makes Clojure so attractive.

In this journey, I compare three simple problems solved in Go, Kotlin, and Clojure, highlighting approaches and syntax.

Problem 1 Simple greeting and syntactic style

It all starts with the classic Hello World. Go is explicit and oriented toward robust tools. A conceptual example in Go would be `fmt.Println( Hello World )`. Kotlin is modern and concise with a familiar syntax for object-oriented programming, for example `println( Hello World )`. Clojure introduces LISP syntax with code as data and prefix calls, for example `(println Hello World)`. Clojure's conciseness stands out because it avoids ceremony like declaring a package or a main function for a simple script.

Problem 2 Data transformation: grouping and summing sales

Suppose the data `[{product: A, value: 10}, {product: B, value: 20}, {product: A, value: 5}]`. In Go, the usual approach is imperative: create a map and iterate through the list accumulating values with a for loop. It is efficient but verbose. In Kotlin, you can use a functional and expressive collection API: `sales.groupBy { it.product }.mapValues { it.value.sumOf { it.value } }`. In Clojure, data transformation is the core: using composition and collection operations, you can describe a clear pipeline, for example `->> sales (group-by :product) (map (fn [[product list]] [product (reduce + (map :value list))])) (into {})`. The semantics describe step by step: group by product, sum values, and convert to a map, like following a recipe.

In summary, Go demands explicitness, Kotlin brings functional elegance on the JVM, and Clojure allows you to think about data transformations directly and expressively.

Problem 3 Concurrency: safely incrementing a counter

Working with shared state reveals design differences. In Go, concurrency relies on goroutines, and for mutated state we use mutexes: create an integer counter, launch 1000 goroutines, and protect the sum with a sync.Mutex. In Kotlin, the answer is coroutines and synchronization utilities for coroutines, for example a Mutex from kotlinx.coroutines and using withLock when incrementing. In Clojure, the strategy is to embrace immutability and use state constructs when necessary: an atom and swap! allow atomic updates without manual locks. With 1000 futures executing swap!, the counter reaches 1000, and the business code remains clean and concise.

All three languages solve safety and concurrency, but Clojure reduces noise in business code by delegating complexity to atomic primitives.

Technical and personal conclusions

Going from Kotlin and Go to Clojure gave me a new way of thinking about programming: fewer rituals, immense expressiveness for transforming data, and concurrency models that fit functional programming. Clojure does not replace the advantages of typed systems and tools in Go or Kotlin, but it adds a direct and powerful way to express solutions.

About Q2BSTUDIO

Q2BSTUDIO is a custom software and application development company that accompanies businesses in their digital transformation. We are specialists in custom software, custom applications, artificial intelligence, and cybersecurity. We offer AWS and Azure cloud services, business intelligence services, and implementation of solutions like Power BI for analytics. We implement AI agents and AI solutions for companies that automate processes and improve decision making. At Q2BSTUDIO, we design custom software and custom applications integrating artificial intelligence and cybersecurity from the design phase. Our AWS and Azure cloud services enable scalability and resilience, while business intelligence services and Power BI turn data into actionable insights. If you are looking for AI for companies, AI agents, or custom software solutions, Q2BSTUDIO has experts in artificial intelligence, cybersecurity, and cloud services to take your project to production.

Contact and closing

If you are interested in exploring migrations, data-oriented architectures, or building custom applications with artificial intelligence and cybersecurity capabilities, get in touch with Q2BSTUDIO. And you, have you learned a new way of thinking by mastering a different language? I would love to read your experiences.

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.