|
|
|
|
|
by hf
4415 days ago
|
|
The answer seems to me quite simple: because they have a different coding
style. Just as no one is bound to K&R or the GNU style, nothing suggests that
crypto code needs to follow Linux kernel conventions. Value consistency above everything. Honestly, I am not convinced that the peculiar if-style isn't actually helping
readability and refactoring. Note, that a Apple-style "goto break" bug might
be harder to construct, when your one-line if's look like this: some_code;
if (something) die(message);
other_code;
Now the surrounding indentation does not suggest that there's an extendable
block where there in fact isn't, as with Kernel style: some_code;
if (something)
die(message);
other_code;
To be perfectly honest, the authors' style reminds me a bit of my younger
self's style: keep logically connected pieces of code tightly together.You (presumably) and I have beaten ourselves into submission to the Linux
style; the authors' haven't. On a side note: your second example even seems to suggest that the authors
made some effort at additional readability by refraining from using the
ternary operator construct. |
|
An awakening!
Is it really so terrible to have things compile quickly and without the usual ./configure nonsense? It seems there are an infinite number of ways an author can organise her project using ./configure; for every one I have to spend time figuring out what they have done.
One of my favourite aspects of djb's build approach (which is what is being used here) is that it's easier (than with the popular build systems) to change compiler and linker options and make static binaries: in most cases, simple edit the conf-* files. Thankfully, authors who use djb's approach usually do not vary much from the model. This means less time spent figuring out how things are organised.
I like (portable) open source software that compiles quickly and cleanly.
djb has continued to deliver on this point.
Nice to see someone discovering this build system for the first time.