This page introduces the concept of 'Faux Objects': the use of a collections to avoid need to declare a class to represent data, and data classes, the solution that makes removes the barrier to declaring a class for storage as an object. Subtopics: When is a collection actually a 'Faux Object?'The Dual Nature of Data:… Continue reading Data Classes: The end of ‘Faux Objects’?
Tag: python
Lambdas: what do you mean I will use them?
Python has lambdas, but with python, the lambda is a very reduced lambda that Guido even hesitated about calling lambda. I would suggest that with python, almost everything that can be done using lambdas, will be easier to understand if rewritten without the lambda. Main Points of the page: Background What is a Lambda again?… Continue reading Lambdas: what do you mean I will use them?
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
Null Safety
To java programmers, 'Null Safety' can sound like the 'Holy Grail'. To python programmers, 'Null Safety' can sound like solving a problem they never had. So what is 'null' safety? Firstly, if you any questions on what 'null' is, then check the page None, Unit, Nothing, void and null. Null safety is all about preventing… Continue reading Null Safety
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