But who loves rules?
Those endless, evil lists one has to memorize and act upon as if they were produced by some sarcastic bureau.
So someone’s decided that SOLID is a nice acronym (“My app is rock-SOLID, huh-huh!”, right?) and stated five rules its dictates. Why five? Why not seven, or three, or 42? Go figure. Why are there exactly twenty-three design patterns? Because. Why must a semicolon follow some types of blocks but not others? Are class definition and function definition that different? (you Pythonists, don’t laugh at us now!)
Rules. Rules. Rules.
A few days ago, a new proposal draft for generics implementation in Golang was submitted. This is a short analysis of that draft. If you know what generics are and aware of the implications of their absence from Go, you might skip the first section and go directly here.
It is a long time that the language has been lacking the ability of defining functions and other entities based on generic, parametrized types rather than concrete types. Thus, for example, the functions for finding minimum and maximum —
math.Max() — are only defined in the standard library for…
Many years have passed since the introduction of Object Oriented Programming concepts, and many programming languages have decided to adopt that approach, reject it or pick some parts of it while leaving others out. Yet, it still seems that the common description of the Three Principles of OOP has not been changed for decades, and it is still firm and valid in the various courses, books and even job interviews. Those three are, obviously, encapsulation, inheritance and polymorphism. …