On 30.07.21 00:32, Josef Grosch via Dng wrote:
Global variables are a disaster looking for a place to happen, avoid at all cost. The scope of variables should be as small as possible.
it depends ... for small programs where you really *know* (by definition) there really may only be one instance of that data, it might be actually the better solution - in that case you know the working set for sure (size of .data). This is the kind of programming where you also rely on the OS (kernel, supervisor, container, ...) doing all post termination cleanups. Many Plan9 programs are written in that way - they're so damn small that they just don't need much function local (or even dynamically allocated) data. --mtx -- --- Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren GPG/PGP-Schlüssel zu. --- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering i...@metux.net -- +49-151-27565287 _______________________________________________ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng