Future projects (post release)
Eric S. Raymond
esr at thyrsus.com
Wed Feb 21 18:05:01 UTC 2018
Ian Bruene via devel <devel at ntpsec.org>:
>
> Future project: refactoring ntpd's system variables into a struct.
>
> I've been looking at the code around mode 6 generation and discovered that
> in some areas it's still globals all the way down. Translating these globals
> will make future refactoring/translating easier.
Also a good plan. And a good exercise for you.
We may not manage one big struct - there can be semantic reasons you might
not *quite* want to go there - but a small number of structs bundling
semantically related globals would be excellent.
Ian, this relates to what I was saying on IRC about not-quite-OO.
"Good" is packing variables into fields of shared-lifetime context
structures. "Better" is using that process to notice what the
program's natural objects are, and carving that way. The first
transformation is mechanical; the second requires taste and judgment.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
My work is funded by the Internet Civil Engineering Institute: https://icei.org
Please visit their site and donate: the civilization you save might be your own.
More information about the devel
mailing list