# modifiers

Published articles for modifiers.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## How Jetpack Compose builds and updates UI with modifiers

DevFeed: [How Jetpack Compose builds and updates UI with modifiers](<https://devfeed.tech/articles/understand-compose-in-3-minutes-39256.md>)

Original publisher: [Read original article](<https://kt.academy/article/compose_understand>)

Published: 2026-06-29T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [ui](<https://devfeed.tech/topics/ui.md>), [layout](<https://devfeed.tech/topics/layout.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>)

Tags: [compose](<https://devfeed.tech/tags/compose.md>), [declarative](<https://devfeed.tech/tags/declarative.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>), [stateful](<https://devfeed.tech/tags/stateful.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This tutorial explains how Jetpack Compose builds and updates user interfaces. It focuses on modifiers, layout measurement, drawing, semantics, user interactions, recomposition, and modifier node interfaces.

### Source excerpt

How Compose actually works? How it works under the hood and why it's so powerful.

## In what order are Compose modifiers applied?

DevFeed: [In what order are Compose modifiers applied?](<https://devfeed.tech/articles/in-what-order-are-compose-modifiers-applied-39254.md>)

Original publisher: [Read original article](<https://kt.academy/article/compose_modifier_order>)

Published: 2026-04-20T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [compose](<https://devfeed.tech/tags/compose.md>), [matters](<https://devfeed.tech/tags/matters.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>), [order](<https://devfeed.tech/tags/order.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

The article explains how Compose modifiers are applied and why their order matters.

### Source excerpt

How Compose modifiers are applied and why their order matters.

## New Shadow API for Jetpack Compose

DevFeed: [New Shadow API for Jetpack Compose](<https://devfeed.tech/articles/new-shadow-api-for-jetpack-compose-25794.md>)

Original publisher: [Read original article](<https://www.sinasamaki.com/new-shadow-api-for-jetpack-compose/>)

Author: sinasamaki

Published: 2025-08-27T18:15:18Z

Content type: tutorial

Language: en

Sources: [sinasamaki](<https://devfeed.tech/sources/sinasamaki.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [ui](<https://devfeed.tech/topics/ui.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [article](<https://devfeed.tech/tags/article.md>), [compose](<https://devfeed.tech/tags/compose.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>), [properties](<https://devfeed.tech/tags/properties.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

This tutorial explains the new shadow API introduced in Jetpack Compose 1.9.0. It covers the available modifiers, modifier ordering, shadow properties such as radius, spread, offset, alpha, color, brush, and blendMode, and includes an interactive demo.

### Source excerpt

How to build realistic UI with the latest shadow API

## How modifiers order affects Compose UI appearance

DevFeed: [How modifiers order affects Compose UI appearance](<https://devfeed.tech/articles/how-modifiers-order-affects-compose-ui-appearance-39353.md>)

Original publisher: [Read original article](<https://kt.academy/article/modifier-order>)

Published: 2025-01-07T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [development](<https://devfeed.tech/tags/development.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>), [ui](<https://devfeed.tech/tags/ui.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

A tutorial explaining how modifier order affects Jetpack Compose UI appearance. It describes modifier behavior in layout and drawing phases and shows how changing modifier order affects padding, backgrounds, and other area-related effects.

### Source excerpt

A complete explanation of how modifier order affects the appearance of your Jetpack Compose UI.

## Jetpack Compose Modifier Guessing Game!

DevFeed: [Jetpack Compose Modifier Guessing Game!](<https://devfeed.tech/articles/jetpack-compose-modifier-guessing-game-39314.md>)

Original publisher: [Read original article](<https://kt.academy/article/game-modifier-guesser>)

Published: 2024-12-09T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>)

Tags: [compose](<https://devfeed.tech/tags/compose.md>), [game](<https://devfeed.tech/tags/game.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [learn](<https://devfeed.tech/tags/learn.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

A fun game for learning about Jetpack Compose modifiers, with difficulty levels based on the number of modifiers and answer options.

### Source excerpt

A fun game to learn about Jetpack Compose modifiers.

## Custom Sliders in Jetpack Compose

DevFeed: [Custom Sliders in Jetpack Compose](<https://devfeed.tech/articles/custom-sliders-in-jetpack-compose-25773.md>)

Original publisher: [Read original article](<https://www.sinasamaki.com/custom-material-3-sliders-in-jetpack-compose/>)

Author: sinasamaki

Published: 2024-09-26T21:56:18Z

Content type: tutorial

Language: en

Sources: [sinasamaki](<https://devfeed.tech/sources/sinasamaki.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Material Design](<https://devfeed.tech/topics/material-design.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [code](<https://devfeed.tech/tags/code.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [material-design](<https://devfeed.tech/tags/material-design.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>), [render](<https://devfeed.tech/tags/render.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

A tutorial on customizing Material 3 sliders in Jetpack Compose. It explains how to create custom thumbs and tracks, calculate the active fraction across arbitrary ranges, and build a reusable slider with snapping points and formatted thumb text.

### Source excerpt

Create unique and delightful sliders for your app

## Restartable functions from first principles

DevFeed: [Restartable functions from first principles](<https://devfeed.tech/articles/restartable-functions-from-first-principles-30533.md>)

Original publisher: [Read original article](<https://blog.zachklipp.com/restartable-functions-from-first-principles/>)

Author: Zach Klippenstein

Published: 2024-07-12T02:38:58Z

Content type: tutorial

Language: en

Sources: [Zach Klippenstein's Blog](<https://devfeed.tech/sources/zach-klippenstein-s-blog.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [Code](<https://devfeed.tech/topics/code.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [callback](<https://devfeed.tech/tags/callback.md>), [compose-state-series](<https://devfeed.tech/tags/compose-state-series.md>), [function](<https://devfeed.tech/tags/function.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [lambda](<https://devfeed.tech/tags/lambda.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>), [snapshot](<https://devfeed.tech/tags/snapshot.md>), [state](<https://devfeed.tech/tags/state.md>)

### AI overview

This tutorial explains how restartable functions work in Jetpack Compose. It describes how callers track state objects read by a function, observe changes, and re-execute or schedule the function when relevant state changes.

### Source excerpt

Often when thinking about Jetpack Compose state, we think in terms of what code will be re-executed when that state changes. We call functions

## Improving Android Accessibility with Modifiers in Jetpack Compose

DevFeed: [Improving Android Accessibility with Modifiers in Jetpack Compose](<https://devfeed.tech/articles/improving-android-accessibility-with-modifiers-in-jetpack-compose-38457.md>)

Original publisher: [Read original article](<https://eevis.codes/blog/2023-07-11/improving-android-accessibility-with-modifiers-in-jetpack-compose/>)

Author: Eevis Panula

Published: 2023-07-11T05:48:08.009000Z

Content type: tutorial

Language: en

Sources: [Eevis Blog](<https://devfeed.tech/sources/eevis-blog.md>)

Topics: [Accessibility](<https://devfeed.tech/topics/accessibility.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Android](<https://devfeed.tech/topics/android.md>), [User interface design](<https://devfeed.tech/topics/ui-design.md>), [android-development](<https://devfeed.tech/topics/android-development.md>)

Tags: [accessibility](<https://devfeed.tech/tags/accessibility.md>), [android](<https://devfeed.tech/tags/android.md>), [assistive-technology](<https://devfeed.tech/tags/assistive-technology.md>), [focus](<https://devfeed.tech/tags/focus.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>), [visibility](<https://devfeed.tech/tags/visibility.md>)

### AI overview

A tutorial on using Jetpack Compose modifiers to improve Android app accessibility. It explains how modifiers can add accessibility information, adjust behavior and semantics, reduce unnecessary tab stops, provide focus indicators, improve touch feedback, and increase touch target sizes. The article also emphasizes testing with different assistive technologies.

### Source excerpt

The other day, I was doing some accessibility fixes on our codebase. I came across a switch that didn't have a label associated with it, meaning screen reader users would need to do a bit of guessing to get the information on what they were toggling. I wanted to fix that and started researching. At one point, I was going through the list of modifiers for composable components and noticed that many could help make the app more accessible. I got so excited! And I wanted to share some of these modifiers with you, so here we are. I'm going to go through these modifiers: toggleable selectable clickable magnifier But first, let's talk a bit about modifiers in general and what they are. What are Modifiers? As the Android Developers site defines modifiers: Modifiers allow you to decorate or augment a composable. Modifiers let you do these sorts of things: Change the composable's size, layout, behavior, and appearance Add information, like accessibility labels Process user input Add high-level interactions, like making an element clickable, scrollable, draggable, or zoomable (Source: Android Developers: Compose modifiers) So they are a way to modify composables' looks, behavior, and semantics. They're used a lot in modern Android development with Jetpack Compose, so if you've ever tried Compose, you've probably come across them. As the modifiers can do many things, we can use them for improving accessibility as well. Let's talk about that more in the next section. Modifiers for Accessibility There are many use cases for different modifiers to improve the accessibility of our apps. For example, with modifiers, we can reduce the amount of tab stops for users that use switch devices, hardware keyboards, or screen readers, or we can add more semantic information for assistive technology users in general. We can add visual cues such as focus indicators or improve the visibility and feedback of touch interactions. A good example is what we will do later in this post by increasing

## Performance in Jetpack Compose

DevFeed: [Performance in Jetpack Compose](<https://devfeed.tech/articles/performance-in-jetpack-compose-25901.md>)

Original publisher: [Read original article](<https://skyyo.medium.com/performance-in-jetpack-compose-9a85ce02f8f9?source=rss-56174fa84bcc------2>)

Author: Denys Rudenko

Published: 2022-10-03T16:41:03Z

Content type: tutorial

Language: en

Sources: [Stories by Denis Rudenko on Medium](<https://devfeed.tech/sources/stories-by-denis-rudenko-on-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [article](<https://devfeed.tech/tags/article.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compose](<https://devfeed.tech/tags/compose.md>), [false-positive](<https://devfeed.tech/tags/false-positive.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [lambda](<https://devfeed.tech/tags/lambda.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>), [performance](<https://devfeed.tech/tags/performance.md>), [recomposition](<https://devfeed.tech/tags/recomposition.md>), [scopes](<https://devfeed.tech/tags/scopes.md>), [skip](<https://devfeed.tech/tags/skip.md>), [ui](<https://devfeed.tech/tags/ui.md>), [val](<https://devfeed.tech/tags/val.md>), [var](<https://devfeed.tech/tags/var.md>), [variables](<https://devfeed.tech/tags/variables.md>)

### AI overview

A practical guide to improving Jetpack Compose performance through stable parameters, skippable composables, optimized recompositions, remembered lambdas, and compiler and layout-inspector metrics.

### Source excerpt

Article tells about my research on how to write efficient Compose code. It consists of 6 sections and a TL;DR/Summary in the end. We will cover: Optimising recompositions When should you use @Immutable and @Stable annotations; Unstable classes, variables, lambdas; Non-restartable & skippable composables; Lambda modifiers; Passing lambdas providing required fields instead of fields in composables; Inlined composables; When you should use remember { }. We'll be using Compose Compiler Metrics and layout inspector tools to know: - If a class is stable or not; - If the composable function is skippable/restartable; - Amount of skipped recompositions. 1. Unstable objects on UI layer. To understand why we should care about stability, let us peek into a very important metric called skippability. It allows compose runtime to skip recomposition of a composable when all the parameters it uses are considered stable. What is considered stable by the compiler? - All primitive value types: Boolean, Int, Long, Float, Char, etc. - Strings - Lambdas (not always, we will get to it later) We want composable functions to use stable params to become skippable. 1) Don't use var when seeking stability. Fields declared as var are considered unstable: https://medium.com/media/724da23ba38eaa9d3312318e7e8038b9/hrefhttps://medium.com/media/f8dd8a39bce60e48b5ff8bdd4a02b9ef/href UserDetails composable will be recomposed even if the user never gets modified. Using val instead of var in User class will fix this issue. 2) Not all lambdas are considered stable. Let's look at the following examples: https://medium.com/media/fbbff417d165a501b21a3e5d2c6f087f/hrefhttps://medium.com/media/c6aaae01fda67c633edcdf7bb351e620/href Since the lambdas capture outside scopes, they won't be automatically inferred as stable and reused as expected. If the lambda requires access to external variables, the compiler will add those variables as fields, which are passed into the constructor of the lambda. We go a 2 ways of

## Drawing custom text spans in Compose UI

DevFeed: [Drawing custom text spans in Compose UI](<https://devfeed.tech/articles/drawing-custom-text-spans-in-compose-ui-29020.md>)

Original publisher: [Read original article](<https://saket.me/compose-custom-text-spans/>)

Author: Saket Narayan

Published: 2022-07-12T15:49:24Z

Content type: tutorial

Language: en

Sources: [Saket Narayan](<https://devfeed.tech/sources/saket-narayan.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [ui](<https://devfeed.tech/topics/ui.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [animation](<https://devfeed.tech/tags/animation.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-ui](<https://devfeed.tech/tags/compose-ui.md>), [library](<https://devfeed.tech/tags/library.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>), [porting](<https://devfeed.tech/tags/porting.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

A tutorial on drawing custom text decorations in Compose UI by annotating text, calculating layout coordinates, and manually rendering animated squiggly underlines. It also demonstrates rounded-corner text backgrounds and packages the implementation as a reusable library.

### Source excerpt

While exploring how text paragraphs are rendered in Compose UI, I nerd sniped myself into porting squiggly underlines from Sam Ruston's Buzzkill app. Sam's animation was implemented using TextView custom spans, but Compose UI does not offer any alternatives for them yet. While our friends at Google are prototyping text modifiers (first, second), I figured [...] The post Drawing custom text spans in Compose UI appeared first on Saket Narayan.

## Composed modifiers in Jetpack Compose

DevFeed: [Composed modifiers in Jetpack Compose](<https://devfeed.tech/articles/composed-modifiers-in-jetpack-compose-27464.md>)

Original publisher: [Read original article](<https://jorgecastilloprz.github.io/composed-modifiers-in-jetpack-compose>)

Author: Jorge Castillo

Published: 2022-04-04T10:00:00Z

Content type: tutorial

Language: en

Sources: [👨💻 Jorge Castillo](<https://devfeed.tech/sources/jorge-castillo.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [ui](<https://devfeed.tech/topics/ui.md>), [context](<https://devfeed.tech/topics/context.md>), [factory function](<https://devfeed.tech/topics/factory-function.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compose-ui](<https://devfeed.tech/tags/compose-ui.md>), [context](<https://devfeed.tech/tags/context.md>), [extension-function](<https://devfeed.tech/tags/extension-function.md>), [factory-function](<https://devfeed.tech/tags/factory-function.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>), [state](<https://devfeed.tech/tags/state.md>), [stateful](<https://devfeed.tech/tags/stateful.md>), [stateless](<https://devfeed.tech/tags/stateless.md>)

### AI overview

This tutorial explains the difference between standard and composed modifiers in Jetpack Compose. Standard modifiers use extension functions and are stateless, while composed modifiers support state and access to composition context by creating them within a Composition.

### Source excerpt

Learn about composed modifiers and compare those to standard ones.

## Copy Paste Compose

DevFeed: [Copy Paste Compose](<https://devfeed.tech/articles/copy-paste-compose-32045.md>)

Original publisher: [Read original article](<https://www.maiatoday.net/p/copy-paste-compose/>)

Published: 2021-11-14T14:27:39Z

Content type: opinion

Language: en

Sources: [maiatoday](<https://devfeed.tech/sources/maiatoday.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [compose](<https://devfeed.tech/tags/compose.md>), [devfest](<https://devfeed.tech/tags/devfest.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>), [pitfalls](<https://devfeed.tech/tags/pitfalls.md>), [talk](<https://devfeed.tech/tags/talk.md>)

### AI overview

A lighting talk examines copy-paste as an early form of code reuse in Jetpack Compose projects, explaining why composable architecture and modifiers can make snippets easy to transplant while highlighting associated pitfalls and sources for code examples.

### Source excerpt

Devfest 2021 West Sweden lighting talk about Copy Paste Jetpack Compose. CopyPaste is often the first attempt at re-using code, but it has its pitfalls. Some musing on why it seemed easier to copy and paste snippets of code in a Jetpack Compose project. It seems to relate to the composable architecture. Composables can be transplanted easily and modifiers can be grafted from one Composeable to another. Some pitfalls and things to watch out for and some good places to find code snippets.

## Build function chains using composition in Kotlin

DevFeed: [Build function chains using composition in Kotlin](<https://devfeed.tech/articles/build-function-chains-using-composition-in-kotlin-28373.md>)

Original publisher: [Read original article](<https://siddroid.com/post/kotlin/build-function-chains-using-composition-in-kotlin/>)

Author: Siddhesh Patil

Published: 2021-08-24T06:36:12Z

Content type: tutorial

Language: en

Sources: [Sid Patil - Android Engineer and Kotlin Advocate](<https://devfeed.tech/sources/sid-patil-android-engineer-and-kotlin-advocate.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [compose](<https://devfeed.tech/tags/compose.md>), [compositional-patterns](<https://devfeed.tech/tags/compositional-patterns.md>), [extension-function](<https://devfeed.tech/tags/extension-function.md>), [functional-chaining](<https://devfeed.tech/tags/functional-chaining.md>), [higher-order-logic-kotlin](<https://devfeed.tech/tags/higher-order-logic-kotlin.md>), [inheritance-vs-composition](<https://devfeed.tech/tags/inheritance-vs-composition.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-articles-by-sid-patil](<https://devfeed.tech/tags/kotlin-articles-by-sid-patil.md>), [kotlin-fold-and-reduce-functions](<https://devfeed.tech/tags/kotlin-fold-and-reduce-functions.md>), [kotlin-functions](<https://devfeed.tech/tags/kotlin-functions.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>), [patterns](<https://devfeed.tech/tags/patterns.md>)

### AI overview

A Kotlin tutorial explains function chaining through compositional patterns and aggregation with fold functions. It uses Jetpack Compose's Modifier system on Android as a reference and demonstrates how to build a similar chaining system.

### Source excerpt

Leverage Kotlin fold aggregating operators to build function chains with compositional patterns. Learn how you can build a system similar to compose UIs Modifier logic on Android

## Useful Kotlin Features Compared with Java

DevFeed: [Useful Kotlin Features Compared with Java](<https://devfeed.tech/articles/kotlin-useful-but-unfairly-not-mentioned-features-38636.md>)

Original publisher: [Read original article](<https://krossovochkin.com/posts/2020_05_03_kotlin_useful_but_unfairly_not_mentioned_features/>)

Published: 2020-05-03T00:00:00Z

Content type: tutorial

Language: en

Sources: [Vasya Drobushkov](<https://devfeed.tech/sources/vasya-drobushkov.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Java](<https://devfeed.tech/topics/java.md>), [Development](<https://devfeed.tech/topics/development.md>), [Android](<https://devfeed.tech/topics/android.md>)

Tags: [classes](<https://devfeed.tech/tags/classes.md>), [hashcode](<https://devfeed.tech/tags/hashcode.md>), [immutability](<https://devfeed.tech/tags/immutability.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>), [package-private](<https://devfeed.tech/tags/package-private.md>), [process](<https://devfeed.tech/tags/process.md>), [smart-cast](<https://devfeed.tech/tags/smart-cast.md>), [visibility](<https://devfeed.tech/tags/visibility.md>)

### AI overview

This article compares Kotlin with Java through several less-discussed language differences. The supplied text covers immutable method-parameter references in Kotlin and contrasts Java visibility modifiers, including protected and package-private access.

### Source excerpt

Source Introduction Many of us first learned Kotlin after Java. Learning process was fairly simple because Kotlin has many similarities when at the same time improves development experience by fighting common pain points Java developer (especially on Java 6, which is common in Android world) has to encounter every day. There are a bunch of articles about cool Kotlin features like immutability, handling nullability, smart-cast, data classes, and so forth. Yes, these features are great. Having to add a bunch of nullability annotations, final keywords, override equals/hashCode methods, create additional local variables after type checks -- all of this adds unnecessary work that needs to be done all the time.

## Clojure: Combining Calls To Doseq And Let

DevFeed: [Clojure: Combining Calls To Doseq And Let](<https://devfeed.tech/articles/clojure-combining-calls-to-doseq-and-let-31898.md>)

Original publisher: [Read original article](<http://blog.jayfields.com/2013/05/clojure-combining-calls-to-doseq-and-let.html>)

Author: Jay (noreply@blogger.com)

Published: 2013-05-16T12:00:00Z

Content type: tutorial

Language: en

Sources: [Jay Fields](<https://devfeed.tech/sources/jay-fields.md>)

Topics: [Clojure](<https://devfeed.tech/topics/clojure.md>), [function](<https://devfeed.tech/topics/function.md>), [iteration](<https://devfeed.tech/topics/iteration.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [clojure](<https://devfeed.tech/tags/clojure.md>), [clojure-functions](<https://devfeed.tech/tags/clojure-functions.md>), [code](<https://devfeed.tech/tags/code.md>), [function](<https://devfeed.tech/tags/function.md>), [iteration](<https://devfeed.tech/tags/iteration.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>)

### AI overview

This Clojure tutorial explains that doseq supports the :let, :when, and :while modifiers also available in the for macro. It compares multiple doseqs with multiple bindings, noting that binding choices can change how often functions are evaluated and that :let can control evaluation frequency.

### Source excerpt

I've you've ever looked at the docs for clojure's for macro, then you probably know about the :let, :when, and :while modifiers. What you may not know is that those same modifiers are available in doseq. I was recently working with some code that had the following form. Upon seeing this code, John Hume asked if I preferred it to a single doseq with multiple bindings. He sent over an example that looked similar to the following example. That was actually the first time that I'd seen multiple bindings in a doseq, and my immediate reaction was that I preferred the explicit simplicity of having multiple doseqs. However, I always have a preference for concise code, and I forced myself to starting using multiple bindings instead of multiple doseqs - and, unsurprisingly, I now prefer multiple bindings to multiple doseqs. You might have noticed that the second version of the code slightly changes what's actually being done. In the original version the 'name' function is called once per 'id', and in the second version the 'name' function is called once per 'sub-id'. Calling name significantly more often isn't likely to have much impact on your program; however, if you were calling a more expensive function this change could have a negative impact. Luckily, (as I previously mentioned) doseq also provides support for :let. The second example can be evolved to the following code - which also demonstrates that the let is only evaluated once per iteration. That's really the final version of the original code, but you can alter it slightly for experimentation purposes if you'd like. Let's assume we have another function we're calling in an additional let and it's expensive, it would be nice if that only occurred when an iteration was going to happen. It turns out, that's exactly what happens. Whether you prefer multiple bindings or multiple doseqs, it's probably a good idea to get comfortable reading both. © Jay Fields - www.jayfields.com