Kotlin: Reified Type Function Parameters

As most Java programmers know, Java generics are erased at compile-time. This has trade-offs, but the two main reasons for this are:

  • Compatibility - Java 1.4 and earlier dealt exclusively in raw types at the VM level. Generics were able to compile without introducing significant new typing to the bytecode and classfile format spec, and having to deal with older classes generated without that typing.
  • Simplicity - By erasing to raw types, the JVM doesn’t have to understand specialization; something that has its own complexities and downsides. For example, specialized types are much more challenging to optimize with a just-in-time compiler.

However, knowing the type parameters used at runtime can have real value, and it’s something Java simply doesn’t offer. Kotlin would like to help in this area, but there are many challenges in doing so.

[Read More]

Kotlin Logging Without the Fuss

One of Kotlin’s strengths is that generally speaking, the code you might write in Java is generally more compact in Kotlin without losing any of the readability, functionality, or performance.

An odd case where that doesn’t prove to be true is declaring loggers as Java developers.

[Read More]

Kotlin Libraries: Concurrency

Today’s Kotlin library article is about the kotlin.concurrent package, and everything that adds to the platform.

Java’s concurrency package is already quite sophisticated, and rather than re-invent so many extremely delicate abstractions, the Kotlin authors focused on making the libraries better suited to the language by decorating and shortening various features.

[Read More]

Using OSX? Why Aren't You Using iTerm, ZSH, and Prezto?

Most developers I run into today (as well as most dev shops) are using Macbooks as their development platform of choice. However, I’ve been surprised how many are using defaults. Notably:

  • Bash
  • Minimal/No Prompt Customization
  • Standard OSX terminal

There’s an opportunity to massively improve your terminal experience with a few steps.

[Read More]

New Site Built with Hugo

I just rebuilt realjenius.com using Hugo, docker, and a variety of other goodness.

I chose not to port over a variety of old content, and I also chose to not worry about feed links to RSS and such. Please review your RSS feeds if you happen to still be following this blog.