Editors' Pick

Trending Posts

Popular Post

Recent Posts

H …

How Regular Expressions within IDE saved my time

Recently, I had a use case in one of my project which seemed quite painful but was ultimately really easy thanks to modern Integrated Development Environments and regular expressions. This case was quite specific to my needs, and the solution was to use something I was used to. All in all, you might think the solution was obvious after reading this article, yet I think it is worth detailing.

Read more Details
post-thumb

Kotlin contracts

Kotlin logo

Motivation

The Kotlin smartcast feature allows to write cleaner code and reduce boilerplate. However, it does not handle all possible situations properly. For example, suppose that we define a function that returns a distinct value if its parameter is not null. When we execute that function under the condition that the distinct value has been returned, then the Kotlin compiler does not automatically cast the parameter to a non-nullable type.

Read more Details