Using Kotlin’s Apply Function for Dynamic SQL with jOOQ

It was hard to limit ourselves to 10 Nice Examples of Writing SQL in Kotlin With jOOQ, recently, because the Kotlin language has many nice little features that really help a lot when working with Java libraries. We've talked about the nice with() stdlib function, which allows to "import" a namespace for a local scope … Continue reading Using Kotlin’s Apply Function for Dynamic SQL with jOOQ

10 Nice Examples of Writing SQL in Kotlin With jOOQ

Kotlin is the next big thing. With Google announcing official support for Kotlin on Android, we'll see a lot more traction for this lovely language. https://twitter.com/StackOverflow/status/864934838037622785 We've already blogged about the Kotlin language recently: 10 Features I Wish Java Would Steal From the Kotlin Language. Should you migrate your application to Kotlin? Perhaps - there … Continue reading 10 Nice Examples of Writing SQL in Kotlin With jOOQ

10 Features I Wish Java Would Steal From the Kotlin Language

This article is overdue. After the hype around the release of Kotlin 1.0 has settled, let's have a serious look at some Kotlin language features that we should have in Java as well. In this article, I'm not going to wish for unicorns. But there are some low hanging fruit (as far as I naively … Continue reading 10 Features I Wish Java Would Steal From the Kotlin Language

Ceylon Might Just be the Only (JVM) Language that Got Nulls Right

Here we go again. THAT TOPIC. But hang on. The approach discussed here (and in the Ceylon language) is not something you see every day. At the same time, it is very cunning. Nulls are baked into the language ... or so it may seem. Indeed, in Ceylon, like in Kotlin (and possibly many other … Continue reading Ceylon Might Just be the Only (JVM) Language that Got Nulls Right

A Very Peculiar, but Possibly Cunning Kotlin Language Feature

This has caught me by surprise. After studying the Kotlin language to learn about how to best leverage this interesting new language for jOOQ, I stumbled upon this puzzler. What do you think the following program will print? fun main(args: Array) { (1..5).forEach { if (it == 3) return print(it) } print("done") } Well... You … Continue reading A Very Peculiar, but Possibly Cunning Kotlin Language Feature

Why Everyone Hates Operator Overloading

... no, don't tell me you like Perl. Because you don't. You never did. It does horrible things. It makes your code look like... Perl made heavy use of operator overloading and used operators for a variety of things. A similar tendency can be seen in C++ and Scala. See also people comparing the two. … Continue reading Why Everyone Hates Operator Overloading