Remove functional-error-handling-in-kotlin
article thumbnail

Functional Error Handling in Kotlin, Part 3: The Raise DSL

Rock the JVM

By Riccardo Cardin It’s time to end our journey on functional error handling in Kotlin with the new features introduced by the Arrow library in version 1.2.0, We’ll mainly focus on the Raise DSL, a new way to handle typed errors using Kotlin contexts. of Kotlin and version 1.2.0

article thumbnail

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

Rock the JVM

Riccardo is a proud alumnus of Rock the JVM, now a senior engineer working on critical systems written in Scala and Kotlin. If you’d like to watch the video form of this article, please enjoy: The Kotlin language is a multi-paradigm, general-purpose programming language. Kotlin offers a lot of different methods to handle errors.

Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

article thumbnail

Functional Error Handling in Kotlin, Part 2: Result and Either

Rock the JVM

By Riccardo Cardin In this series first part , we introduced some of the available strategies to handle errors in a functional fashion using Kotlin and the Arrow library. In this second part, we’ll continue our journey by looking at the Result and Either data types and how to use them to handle errors in a functional way.

Scala 71
article thumbnail

Kotlin Context Receivers: A Comprehensive Guide

Rock the JVM

By Riccardo Cardin This article will explore a powerful feature of the Kotlin programming language called context receivers. If you’re a Kotlin developer looking to write cleaner and more expressive code, context receivers are a tool you’ll want in your toolbox. Make sure you have Kotlin version 1.8.22 withType ().

Scala 52
article thumbnail

The Ultimate Guide to Java Virtual Threads

Rock the JVM

Riccardo is a proud alumnus of Rock the JVM, now a senior engineer working on critical systems written in Java, Scala and Kotlin. class ); However, we won’t use the logger object directly in our example but the following custom function log : static void log ( String message ) { logger. getLogger ( App. getLogger ( App.

Java 145
article thumbnail

Object equality in Java and Kotlin

Booking.com Engineering

Introduction We are going to review the subtleties and complications of trying to compare objects for equality in Java, where the problem originates, why it is important, Kotlin’s approach on the problem and some recommendations on the topic. At this point, we already encounter a difference in terms of performance.

Java 52
article thumbnail

Seamlessly Swapping the API backend of the Netflix Android app

Netflix Tech

We do this orchestration on our endpoint code using a library provided by our API team, which exposes an RxJava API to handle the downstream calls to the various backend microservices. In addition to hosting our route handlers, this service also handled the business logic necessary to make the downstream calls in a fault tolerant manner.

Java 93