From Wikipedia :
The lexical order is a generalization of how the alphabetical order of words is based on the alphabetical order of their constituent letters.
In practice, this means that file names are compared as strings, using character codes to determine the order. The order of the character codes of the English alphabet corresponds to the natural order of letters, but the character order of the characters is important if non-letters are also part of the file name (for example, numbers and other characters such as '-' ).
This is just an agreement to determine the (arbitrary) order of the source files if the package contains several source files, and the order remains the same if the package is recompiled (and, of course, the files are not renamed).
The goal is to always process the source files in the same order, so the functions of the init() package also execute in the same order, and you will observe the same behavior. Often the order of the functions of the init() package does not matter, but there may be times when it does. Following this convention in lexical file name ordering, you can rely on the (fixed) order of execution of the init() functions.
source share