Skip to main content

TypeScript for Java Developers: The 'unknown' Type

·4 mins

TypeScript 3.0 introduced the unknown type, which is described as being: “Like any, but type-safe”. This is an exploration of what that means in the Javascript and TypeScript ecosystems. and how that can be compared to strongly-typed languages like Java.

Contracts in Kotlin 1.3

·9 mins

Kotlin 1.3 is bringing a new experimental feature to the compiler to help with improving program correctness via the type-system: contracts.

Contracts are a tool that allow library code (both standard library and your libraries) hint to the compiler about the constraints that are ensured on types based on the use of functions in your program. Let’s see how this can be used in practice.

Highlighting Lines in Hugo Code Snippets

·2 mins

Hugo makes it quite simple to share code snippets with syntax highlighting on your site, but did you know you can highlight individual lines in code-snippets as well?

De-Structuring in Kotlin

·5 mins
Recently I wrote an article about de-structuring in TypeScript, and hinted that Kotlin has a similar feature, but in more of a “strongly typed” language style.