Coding Fun Kotlin Kotlin for C# Developers – Alex Dunn

Kotlin for C# Developers – Alex Dunn

Dive into the latest craze in languages and platforms – Kotlin. This time we will be looking at it from the perspective of a .NET C# developer, draw comparisons between the languages, and bridge the gap between these 2 amazing languages.
We’ll look at:

Kotlin as a language
Platforms Kotlin is great for
Object Oriented Implementations in Kotlin
Extended Features
Features Kotlin has that C# doesn’t
A demo Android application in Kotlin vs a Xamarin.Android app in C#
In the end you will leave…

Tags: , , , , , , , , , , , , , , ,

5 thoughts on “Kotlin for C# Developers – Alex Dunn”

  1. Ah, the old "Java *Impl argument" again. Calling your implementation *Impl has nothing to do with Java and is just because of lazy programmers. Don't call your things Impl and don't bash a language for the fallacies of its users.

    And regarding IDogService vs. DogService – if the consumer of an object need to know if it's an interface or a class you are doing it wrong. You are stuck in class-oriented programming. The consumer should only care that it is working with an object following a given contract and not if it's an interface, abstract class or concrete implementation. This is a known problem since the birth of C++; the confounding of types and implementations.

    One design-style that helps a bit is where libraries and modules only exposes the types(contracts) like "List" and do not expose the implementations (ArrayList) by hiding the implementations behind static factory functions (var list = Lists.arrayList()). This is trivial in Java using the package private access modifier, maybe the "internal" access modifier in C# can accomplish the same.

    I also recommend looking into the work around DCI by Jim Coplien and Trygve Reenskaug.

  2. Valour says:

    Kotlin main selling point is to avoid the nulls.

  3. Misha says:

    I like Alex Dunn, he seems honest about it all

  4. Good talk but the Kotlin code examples are not idiomatic at all. For example, initializing objects to null is a no-no in Kotlin.

Leave a Reply

Your email address will not be published. Required fields are marked *