Static Typed vs Dynamic Typed Languages

Programming languages are categorised as either static typed ,or dynamic typed, and the differences may actually surprise, as they go deeper than it may seem at first. Contents: Dynamic Type Variables: The Obvious, but Superficial Difference Dynamic Types: A Deeper Difference Strange Behaviours Behaviour Summary: Total flexibiliy, total uncertainty Static Types Compile Time vs Run… Continue reading Static Typed vs Dynamic Typed Languages

Advertisements

From Extension Lambdas to expressive Kotlin DSLs

Extension functions, and Lambdas and even Extension Lambdas have both been discussed already (and are assumed knowledge for this page).  But the uses of lambdas goes beyond just functionality, and into the realm of expressive code.  Expressive code is about having the code represent the ideas behind the code more clearly, allowing better reading of the… Continue reading From Extension Lambdas to expressive Kotlin DSLs

Gradle Kotlin DSL 1.0: Basic App Build

Contents: Kotlin DSL list of other pagesBuild Basics in Gradle Plugins Dependencies and Artifact Repositories A Simple Practical ExampleVarying the Source Locations: SourceSetsApplicationTesting - JUnitlocal jars as dependencies Build Basics with Gradle. The build file prepares a configuration for gradle and for any optional extra build tools.  The basic configuration for a build requires: what… Continue reading Gradle Kotlin DSL 1.0: Basic App Build

Closures, methods, static methods, class methods

Everything you ever wondered about closures, and a few things more: Closures: just what are closures? Closures as code, packaged with parameters Methods as closures: Python Methods as closures: Kotlin Static Methods class level methods/companion object methods Closures: just what are closures? Lets start with an example, and then discuss how it works. The function… Continue reading Closures, methods, static methods, class methods

OOP: Using Kotlin to improve OOP Skills

Ok, Object Oriented Programming (OOP)is not exactly new, and there are lots of pages on OOP on the web.  This page comes from a background of both Python and Kotlin, and how improved programming styles offered by Kotlin can change how you program.  Although Kotlin automates newer techniques and provides assistance coding, you can 'backport'… Continue reading OOP: Using Kotlin to improve OOP Skills

Building with Gradle Kotlin DSL 1.0

Big News!  (Aug 2018) After what seems like the longest time, Gradle support for using kotlin to drive gradle builds is now at version 1.0.  This is the best time for anyone to move to gradle.  This page is an introduction to gradle, using kotlin DSL What is a build tool? Which Build Tool? Basic… Continue reading Building with Gradle Kotlin DSL 1.0

Python to Kotlin: Variables and Types

Contents: python kotlin boxed objects vs unboxed primitives None, Nothing, Unit and null null safety Python Variables and Types As explained in the background, all values in python are objects stored in dynamic 'heap' memory, and variables are simply references to these objects. This means the only static or stack frame based information for any… Continue reading Python to Kotlin: Variables and Types