Tech corner - 18. July 2023

Undone Programming Newsletter #4

header_image

Dear readers,

get ready for an enlightening journey through the latest advancements and exciting possibilities in the world of programming! In this compilation, we delve into functional error handling in Kotlin, Project Loom, Scala 3 and the game-changing Mojo programming language for AI development. Isn't it exciting? Scroll and find out more!

Functional Error Handling in Kotlin, Part 1: Absent values, Nullables, Options

Rock the JVM blogs, videos and tutorials are renowned sources of learning materials for Scala. Now it’s also focusing on Kotlin.

Using exceptions and try-catch blocks in some JVM languages has been a standard strategy for handling errors. There are possibly better options for doing it in functional style, such as using nulls, options or other algebraic data types – but these often come with their own trade-offs, such as composability. Or do they? Read this blog to learn how utilizing Kotlin and the Arrow library’s extension and receiver functions can help solve these issues.

What is blocking in Loom?

If you follow Java/JVM news, you might have heard of Project Loom, an implementation of lightweight Virtual Threads in JVM. At first look it may seem that having virtual threads will solve all the headaches of asynchronous programming models (callbacks, futures, thread pool management) and enable us to simply write our code in synchronous and direct style. But is that really the case? Check out this article by Adam Warski from Softwaremill to find out more about it all. He dives deep into the implementation and reveals that, actually, it’s not always the case.

Scala 3: What Is “Direct Style”?

As already mentioned, asynchronous programming can come with a mental overhead that Project Loom should help to mitigate, but are there other approaches that can deal with this at the language and compiler level (as opposed to runtime)? There’s a new development in Scala that introduces boundary/break mechanisms to help write async programs in direct style. On top of that comes the ability to use the same functionality to handle other monadic types, such as nullable or option types. Can you see the link to the first article too?

Getting started with the Mojo programming language for AI

Have you heard of Mojo? It’s the new kid on the block in programming languages. Mojo’s building on top of Python, wisely utilizing one of the largest ecosystems and developer pools while trying to solve all its major pain points – like performance, memory management, dynamic types and error handling. Although a general-purpose language, its killer use-case is AI application development. Have a read of this blog to find out more.



blog author
Author
Michal Kaščák

I am a knowledge-obsessed, life-positive software developer who approaches every day with a passion for learning and a drive to inspire others. As a natural problem solver, I excel at applying creative thinking to solve complex problems and am constantly pushing the boundaries of what is possible in software development.

Read more

Contact us

Let's talk

I hereby consent to the processing of my personal data.