These pages are targeted at people who can already program in Python, so the most basic aspects of functions and methods is assumed knowledge, and this page focuses on what is of interest to those who aleady have that assumed knowledge. Default Value Parameters.The default value trap'Pure' functions / methodsFunction overloading Default Value Parameters Both… Continue reading Functions and Methods (With the Traps and Tricks)
Tag: functions
Extension Functions & Extension Properties
The syntax and rules of extension functions are explained also explained elsewhere, but this page is more tutorial style, covers the background and 'why do we need extensions' and 'what is the benefit', together with simple examples, and even useful examples. The topics are: What are extension functions/properties? What is the advantage of extension functions?… Continue reading Extension Functions & Extension Properties
OOP vs Functional: No contest!
Moving to kotlin, the question can arise: "should I program in OOP (Object Oriented Programming) style, or move to Functional programming?". This page examines reviews what Object Oriented programming really means, what functional programing is, and outlines how there is no incompatibility if the correct approach to OOP is in place, and the two paradigms… Continue reading OOP vs Functional: No contest!
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?