r/Kotlin • • Dec 20 '24

Why You Don’t Need a DI Framework: A Case for Manual Dependency Injection

0 Upvotes

I wrote a blog post on the above topic. I'll love to hear others thoughts on this?

https://dannyryman.github.io/tech-blog/2024/12/18/you-do-not-need-a-di-framework.html


r/Kotlin • • May 17 '23

Impossible Algorithm: Computing income tax in constant time

Thumbnail
roosterdan.medium.com
3 Upvotes

r/Kotlin • • Feb 08 '24

This image describes whole Kotlin philosophy to me

Post image
4 Upvotes

r/Kotlin • • Dec 14 '18

Half of the Kotlin users are not Android users according to Stack Overflow!

Post image
10 Upvotes

r/Kotlin • • Jun 15 '22

Java or Kotlin?

0 Upvotes

Hello there. I am a beginner and want to persue my dream of becoming an android app developer. Should I learn Java first then shift to Kotlin or Learn Kotlin from the Beginning?


r/Kotlin • • Jan 06 '24

How many years does it take to become a proffesional software engineer?

0 Upvotes

I have been learning kotlin for almost 6 months and was wondering how long it takes to become a software engineer? Also at the places you work, did your colleges got University or College to learn programming or are most of them self taught. Also do they teach kotlin at universities?


r/Kotlin • • Sep 27 '26

Finally built the app idea I'd been sitting on for years, entirely in Kotlin

Thumbnail
gallery
0 Upvotes

A Share Pray app. I've had this idea in my head for a long time - an app where people can share prayer requests and pray for each other in groups. Kept putting it off, the usual story. A while back I just sat down and built it, on Kotlin Multiplatform since I write Kotlin daily anyway.

A few things about the language itself that made the build smoother than I expected:

Coroutines and Flow ended up doing most of the heavy lifting. The prayer feed is reactive, Flow all the way from the repository layer up to the UI, so when someone adds a prayer to their list or a group gets a new post the screen just updates on its own without me wiring any manual refresh. Structured concurrency also made cancellation way less painful than I remember it being with callbacks - the coroutine scope gets cancelled when the screen leaves composition, so theres no leaked requests hanging around.

Common interfaces + expect/actual carried the platform specific bits. Scheduling the daily reminder notification, the native share sheet, and the Google Sign-In vs Sign in with Apple handoff all sit behind a common declaration in shared code, with the actual implementation swapped per platform. Small thing but it keeps the shared module honest, you can tell at a glance whats genuinely cross platform and what isnt.

Sealed interfaces for modeling state - the session check (valid / rejected / server unreachable) and the feed update decision (apply silently vs hold it behind a "new prayers" button) - made a bunch of the logic exhaustive at compile time, which caught a couple edge cases I'd otherwise have hit at runtime.

kotlinx.serialization is shared between the client and the server too, since the backend is Kotlin as well, so the same data classes get reused on both sides instead of me maintaining two copies of the same model that drift apart.

End result, a good chunk of the codebase ended up shared across iOS, Android and the backend - more than I expected going in. The two clients share around 80% give or take, and a lot of the core (models, validation) carries over to the server on top of that.

I also pulled the reusable bits (groups, tags, IAP wiring, admin panel) out into an open source template while I was at it, in case its useful to anyone as a reference: https://github.com/NonGrate/Poster

Live on iOS now, Android is in open testing. Curious what Kotlin features ended up mattering more than you expected on your own projects.


r/Kotlin • • Mar 26 '24

Is Kotlin similar to Typescript?

0 Upvotes

I just started learning Kotlin and I'm surprised on how similar it is to Typescript. I've been coding in JS and TS for years and thought it was time to jump on to the next language. I started with Golang but to be honest, the job market does not favour Golang as much as Kotlin, so I thought I'll learn Kotlin and add some Java later to make myself more appealing. What I did not expect is how similar Kotlin is to Typescript in syntax, if `lambda` was applied like `arrow functions` and `const` was used instead of `val`, Kotlin would be almost identical to Typescript.
I just started tonight and have not delved into the heavy lifting, but am I wrong? If the trend goes like this, I could start developing in Kotlin after a week. I hope so, I really don't want to spend months learning a new language.

By the way I want to build a TV app (android TV) and I thought Kotlin might be a good solution for that.


r/Kotlin • • Jan 11 '25

Am I the only one who hates typescript?

16 Upvotes

I learned javascript about 5 years ago and just because I love android, I started to learn kotlin. I didn't go deep into building android apps because I felt there was no point sticking to kotlin without learning Java (deep down, I feel java can kill me). Anyway, I was recently forced to learn typescript with react and honestly, I hate it. I know a lot of people will say typescript and kotlin looks similar, I see it, but kotlin is better. Typescript just feels like "alot" especially with react js.

Just before I go crazy, I am hoping someone else feels the way I feel and validates my opinion. lol


r/Kotlin • • Jul 04 '20

Null Safety in Kotlin

Thumbnail
medium.com
0 Upvotes

r/Kotlin • • Nov 13 '24

Has Kotlin become boring for you?

0 Upvotes

I'm following the development of Kotlin since 10 years now and was very exited in the first five years or so. I still enjoy writing (and reading) Kotlin code, but the language development looks more and more boring to me. Yes, the new compiler was a good and important step, but there are not many news on the language level. Kotlin 2.0 was mostly about the compiler, but even the roadmap for 2.1 doesn't look very intersting. It looks like most stuff is happening with Kotlin Multi Platform. If you are not interested in it, then Kotlin is somewhat boring these days. Do you feel the same?

Maybe that is also a sign of maturity, but then again there would be some interesting features like more powerful pattern matching and deep immutability that are simply not happening.


r/Kotlin • • Jul 04 '22

No Kotlin in the new OS of Google named "Fuchsia" (Android replacement)

0 Upvotes

According to Google, Fuchsia is:

"Fuchsia is a modern open source operating system that's simple, secure, updatable, and performant."

Fuchsia is the replacement for Android + Kotlin.

Discussion here:

The end of the Kotlin+Android love story - Kotlin Discussions (kotlinlang.org)

List of porgramming languages supported by Fuchsia. As you can see Kotlin is not listed in the list of supported programming languages for Fuchsia.

Language usage in Fuchsia

Why did somebody downvoted this question? It is a legitimate question. you don't need to downvote it or vote for it. Just comment it and contribute to a helpful discussion which would help me and you.


r/Kotlin • • Jun 15 '25

LiveData in Kotlin

Thumbnail gallery
0 Upvotes

r/Kotlin • • Jun 11 '24

Hot Take on Ktlint: Wildcard Imports are actually okay. The concept that they are bad should die with Java.

0 Upvotes

So, I'm an experienced Kotlin developer and I've been using Ktlint for quite a while and it's always annoyed me that by default it does not allow wildcard imports. Not for java.util, not for org.junit.jupiter.api.Assertions, nothing. This shouldn't be the case and shouldn't be the standard as we move forward.

I'm not the first to make this argument. Uncle Bob did in Clean Code and Kevlin Henney reiterated it his talk at NDC London in 2017 ( https://youtu.be/FyCYva9DhsI?si=opo9jmBzpbOjq-qJ&t=1674 **). Their argument is that long import lists add more of a distraction from your code than they are a benefit to it and the fact that IDEs hide these lists further strengthens the argument not to have them. I simply agree with them (not on everything, but most certainly on this).

It's honestly baffles me that the idea that we shouldn't have wildcard imports still sticks around in 2024. In Kotlin, with can create aliases for specific imports, which further weakens the idea that wildcards are "bad."

I'm interested in reasonable arguments as to why they should be prohibited by default, especially from any developers actively working on Ktlint.

UPDATE:

Switching to Ktfmt which doesn't enforce that as rule by default, just makes sure my code style is consistent, which is what I personally want from a linter, and doesn't concern itself with whether or not I use sensible wildcard imports. Seems like plenty of folks disagree with my stance XD

FINAL UPDATE AND QUESTION:

Is it the role of a linter to disable features of the language it lints?

** it's a really good talk and you should totally watch the whole thing, but this link starts as he begins to talk about imports in Java


r/Kotlin • • Dec 06 '16

Conclusions at writing library to checking email in Go, Rust, Dart, Swift and Kotlin

0 Upvotes

I have built a library to check the syntax of email addresses in different modern languages. So I was able to verify in an objective way such languages and get my conclusions.

I hope that can help someone to choose a language between them.

Libraries
My conclusions


r/Kotlin • • Dec 22 '17

Awesome Kotlin

Thumbnail
kotlin.libhunt.com
2 Upvotes

r/Kotlin • • Mar 11 '24

salary of a kotlin developer in india

0 Upvotes

what's the average salary of a kotlin developer in india?? should i chose this path? I'm a 2nd year student currently working in machine learning, but want to expand my skills in android too, what do u think??


r/Kotlin • • Jul 07 '25

Kotlin Newbie – Need Tips to Get a Dev Job by Year-End

Post image
7 Upvotes

I’m new to Kotlin and just getting into Android development. I’m from India and aiming to land my first job or internship before 2025 ends.

Would really appreciate any advice on:

What to focus on as a beginner

Must-build projects for portfolio

Good resources (courses, YouTube, etc.)

How to prep for entry-level interviews in India

Any tips or experiences would be super helpful. Thanks in advance! πŸ™


r/Kotlin • • Apr 23 '22

Why is there no .put (foo[bar] = baz) operator?

0 Upvotes

We have a .get(key: K): V operator to do foo[bar] so why isn't there a .put(K, V): V operator so we can do foo[bar] = baz?

Was this intentionally left out? Am I missing anything obvious here?


r/Kotlin • • Jul 11 '23

Kotlin will take over everything for sure.

0 Upvotes

it's crazy how awesome this language is and it's ecosystem. I didn't know compose was multi platform?

like Web/Desktop and even IOS?. yeah kotlin is a no Brainerd.

I'm actually excited for the future of cross platform using kotlin


r/Kotlin • • Jan 05 '24

Does anyone use non-IDEA for Kotlin development?

3 Upvotes

I don't want to use JetBrains products (Android Studio included) and prefer something more free/open sourced like Visual Studio Code or VIM + Terminal.But in most of the tutorials that I have seen, people use IDEA to develop in Kotlin, but it is not very convenient for me. It feels like I simply have no choice, unlike the same Dart, Rust, JS, etc.

So.. does anyone use tools other than IDEA for development? Are you comfortable working with this?

UPDATE
Apart from the paid subscription, I just don’t like the developer experience of IDEA, it requires a lot of PC resources and hides a bunch of settings behind its GUI, so often I (as newbie) just don’t understand how exactly my project is configured.


r/Kotlin • • May 07 '21

Advanced Kotlin

Thumbnail
youtube.com
1 Upvotes

r/Kotlin • • Sep 20 '26

What if Kotlin/Native evolved into an ARC-based general-purpose native systems language?

0 Upvotes

I've been thinking about the long-term direction of Kotlin/Native.

Kotlin/Native already has many ingredients of a serious native language:

  • LLVM native compilation

  • direct C interoperability

  • pointers and native memory APIs

  • no JVM requirement

  • multiplatform support

  • Swift/Objective-C interoperability

  • much higher-level ergonomics than C

But compared with languages such as Swift, Zig, D and Rust, Kotlin/Native still has a relatively heavy runtime model for some low-level and FFI-heavy workloads.

What if Kotlin/Native eventually offered an ARC/ownership-oriented, no-GC execution mode designed specifically for native systems programming?

The goal would not simply be:

replace GC with ARC

but rather:

make memory lifetime deterministic, make native ABI boundaries thinner, and allow Kotlin/Native to operate as a true general-purpose native systems language.

Swift shows that ARC can work well for a high-level native language

Swift is probably the most obvious comparison.

Swift gives developers:

  • high-level language features

  • value types

  • reference types

  • deterministic ARC-based object lifetime

  • native compilation

  • very close integration with Objective-C and C

ARC is not free, of course. Retain/release operations have overhead, cycles still need to be handled, and compiler optimization matters enormously.

But modern compilers can perform ownership analysis and remove many unnecessary retain/release operations.

That suggests an interesting direction for Kotlin/Native:

Kotlin object semantics
        ↓
ownership analysis
        ↓
ARC when required
        ↓
retain/release elimination where possible

Instead of requiring a tracing GC for all normal native object lifetime management.

Zig shows what a very thin native boundary can look like

Zig takes almost the opposite approach.

It has:

  • no tracing GC

  • explicit allocators

  • direct pointer-oriented memory access

  • first-class C ABI compatibility

  • native C header integration

  • very small runtime assumptions

For low-level FFI, the model is extremely simple:

Zig
 ↓
C ABI
 ↓
C library

Primitive values, pointers, structs and function pointers can cross the boundary with almost no semantic translation.

Kotlin/Native could benefit from having a similarly explicit native ABI zone.

For example:

@CAbi
external fun send(
    handle: ULong,
    data: CPointer<UByteVar>,
    size: UInt
): Int

Ideally this could compile approximately as:

Kotlin/Native
      ↓
LLVM direct native call
      ↓
C ABI

with no boxing, no object conversion and no GC transition for ABI-safe types.

D shows that a high-level language can also expose a low-level mode

D is another interesting comparison.

Normal D provides a fairly rich runtime and high-level programming model.

But D also has BetterC, which allows developers to use a restricted subset of the language without relying on the full D runtime or garbage collector.

That is especially interesting for Kotlin/Native.

Kotlin/Native would not necessarily need to force every program into one memory model.

It could support something conceptually similar:

Kotlin/Native

Normal Native Mode
β”œβ”€β”€ ergonomic Kotlin objects
β”œβ”€β”€ ARC
β”œβ”€β”€ deterministic lifetime
└── higher-level runtime services

Systems / ABI Mode
β”œβ”€β”€ no tracing GC
β”œβ”€β”€ POD types
β”œβ”€β”€ pointers
β”œβ”€β”€ slices
β”œβ”€β”€ handles
β”œβ”€β”€ function pointers
β”œβ”€β”€ explicit allocation
└── predictable native ABI

This would be somewhat analogous to what BetterC provides for D, but designed around Kotlin's type system and compiler architecture.

The interesting combination would be

Kotlin/Native could potentially take lessons from all three languages:

Swift
β†’ ARC
β†’ ownership optimization
β†’ deterministic object lifetime

Zig
β†’ thin C ABI
β†’ explicit low-level memory access
β†’ minimal hidden runtime behavior

D / BetterC
β†’ high-level language
β†’ optional low-level runtime-free execution mode

Kotlin
β†’ ergonomics
β†’ coroutines
β†’ multiplatform
β†’ existing ecosystem

That combination could be very interesting.

FFI is where this could matter most

Today, the expensive part of native interoperability is often not the actual machine-level function call.

The expensive part is everything around it:

Kotlin object
    ↓
runtime representation
    ↓
pinning / stable references
    ↓
interop wrapper
    ↓
native ABI

For Strings, collections, callbacks and managed objects, this overhead can become significant.

A systems-oriented Kotlin/Native mode could instead encourage ABI types such as:

integers
floats
pointers
handles
POD structs
slice { pointer, length }
function pointers

Then the boundary becomes:

Idiomatic Kotlin API
        ↓
zero-cost ABI adapter
        ↓
C ABI
        ↓
Rust / Zig / D / C / C++ / Swift

This would be useful for:

  • networking

  • databases

  • RPC frameworks

  • UI engines

  • rendering engines

  • game engines

  • audio

  • embedded systems

  • native SDKs

  • OS components

This would also make Kotlin/Native more independent

Today Kotlin/Native is often perceived as:

Kotlin without the JVM

I think it has the potential to become something much more ambitious:

a general-purpose native language with Kotlin's syntax and ecosystem

That would put it into a very interesting design space.

Not as strict as Rust.

Not as low-level as Zig.

Not as runtime-heavy as traditional managed languages.

And more ergonomic than C++ or D for many developers.

Something like:

Kotlin ergonomics
+
Swift-like ARC
+
Zig-like thin FFI
+
D BetterC-like systems mode
+
LLVM
+
Multiplatform

That combination doesn't really exist today.

The biggest technical question is probably whether Kotlin's existing object model and runtime could support an ARC/no-GC execution mode without fragmenting the language too much.

For people familiar with Kotlin/Native internals:

How realistic would an ARC + ownership optimization + no-GC systems mode actually be?

And would this make Kotlin/Native more attractive to you for systems programming?


r/Kotlin • • May 17 '24

Kotlin vs Java

0 Upvotes

This being a kotlin sub, I'm expecting to hear that kotlin is the way to go. I'm a long time web developer and I've decided to start teaching myself "android development". Should I go kotlin or java?