@907pqv
I’ve been waiting for the founder’s response to your question, but it seems he’s too busy and expects some DNH member to give you an answer. So I’ll do that. To your question.
Idiomatics / shallow module
Let’s first try to understand the two terms idiomatic and shadow module. The former is an attempt to name something linguistically natural for humans. The latter is a small, independent unit or file containing standardized functions/parts that can be used to build a more complex structure, such as an app (e.g., with the java.io.InputStream module) or a car (e.g., with the Gearbox unit). A shadow module is nothing more than a “flat” module that unnecessarily contains too few functions or parts to be economical or meaningful.
Then we’ll talk about the relationship between compiler techniques and idiomatics. Compiler techniques begin with microcoding, assembly language (2GL), and 3GL like C/PASCAL, and end with OOPL like C#, JAVA, or PYTHON. In compiler techniques, problems must be solved step by step. This means developing an algorithm that leads to the desired solution, for example, an algorithm for a query with three steps:
- if condition
- OK: …
- FAILED: …
Both depend on the problem and the algorithm. In low-level environments with memory constraints, microcoding or assembly language is the best choice. From a high-level perspective, however, this type of programming is cumbersome and unreadable, but fast and efficient. Assembly language is therefore the first attempt to make programming languages more idiomatic.
At higher levels, where the problems are still manageable and resources are relatively abundant, 3GL is more suitable. For example, for human-readable trigonometric functions, logarithms, etc. Instead of programming in assembly language, 3GL uses a compiler to translate human-readable functions like cos() and ln() into assembly code. It’s the second step toward idiomatic language, so to speak.
The democratization of computers in 1990 required rapid software development, and 3GL became less suitable as problems became increasingly complex and had to be treated as entire objects. OOPL, like C++/JAVA/C#, is the next step toward idiomatics. Objects represent the problem as a whole with multiple facets that can then be isolated and solved. A next step toward idiomatics with object and function/method names in a human-readable language. With idiomatic objects, code becomes smaller and more readable in natural human language. Software development times are reduced, but throughput (performance) also decreases (I remember JAVA 1.0 being so slow that you could enjoy a cup of coffee before a small loop finished). Today, however, throughput is significantly better. All this is thanks to rapid memory development (in 1990, the average PC had 1 MB of RAM). With more RAM in GB, OOPL becomes popular and is therefore a new approach to software development with idiomatics that are easier and more meaningful for human to read.
Kotlin is to OOPL what 4GL is to 3GL (SQL, for example, is a 4GL). It represents the latest step toward more compact and idiomatic programming algorithms. Therefore, your Kotlin examples can be considered functions rather than “flat modules,” such as the trigonometric functions of the java.lang.Math module.
In general, the more idiomatic a programming language is, the slower its throughput (or performance). An example of an equal comparison algorithm (here: x86 assembly)
Microcoding 2GL (Assembly) 3GL (C) OOPL(C++/JAVA) Kotlin 4GL (NATURAL)
00111000 CMP if condition if condition similar OOPL IF condition
1011xxxx Jxx label_1 { { or: idiomatics as expression. THEN ...
... ... ... ... example x = if (a > b) a else b ELSE ...
1110xxxx JMP label_2 } } or: idiomatics as function ENDIF
label_1: else else example: coerseXXXX or takeIf
{ {
... ... ... ...
label_2: } }
... ... ... ...
Note: More about 4GL NATURAL click HERE
As you can see, readability improves from 2GL to 3GL/OOPL to Kotlin/4GL. The more natural the names, the better the readability and the more idiomatics there are. The reason for the low throughput, by the way, is that an idiomatics acts like a wrapper around a section of code, as you can see in the table above. In a narrow sense, idiomatics like coerseXXX or takeIf can be considered “shadow modules.”
The idiomatization process is transmorgrifying from natural human words to human thinking, as OOL objects are still too limited in human thinking. In OOL, a car or a tree is an object with specific descriptions as functions. However, human thinking does not view a car or a tree as an object, but rather as a generic subject that encompasses more than just physical and logical functions, but also rational and emotional aspects. And that is the new era of AI Large Lnaguage Models (LLMs).

We’re currently experiencing the most visible transmorgrification in ChatGPT where problems are solved and represented in the most natural way for human mind, something unknown in any programming language. You can even ask ChatGPT for a piece of executable code.
Design for Readability, Not Writability
Idiomatics is a maximal approximation of natural human language. In the veritable sense: Readability = comprehensibility. And what is writability? It is the state or condition of being writable. Therefore, in the context of “designing for readability, not writability,” I cannot say anything about “writability.”