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


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

Nullable, null, None, Unit, Nothing and void: the many faces of nothing

Python has only one way of saying 'there is nothing here':  None.  Java has the keyword 'void' and the value 'null', kotlin has Unit, Nothing and null.  What is the actual difference in meaning for all of these? Python None Kotlin Unit, null and Nothing Java void and null The concept of 'Nullable' Null Safety… Continue reading Nullable, null, None, Unit, Nothing and void: the many faces of nothing

var, val and Immutability

Why 'var' or 'val' at all? TL;DR:  adding the 'var' (or val) is clearer than python syntax Python programs traditionally just set variables to a value, not fuss no extra step.  Creating the variable by giving it a value uses the same syntax as setting an existing variable to a new value. Using the same… Continue reading var, val and Immutability

Basics: Origins, ‘Hello World’, Comments

Python is an interpreted language, often described as a 'scripting language'. Python  evolved origins of improving the teaching and prototyping language ABC and  being a language ideal for the programmers own projects, to now being a language used in  large scale web servers, AI and other substantial projects. Kotlin is a compiled language, targeted from… Continue reading Basics: Origins, ‘Hello World’, Comments