[Info-vax] C versus Macro-32 readability, was: Re: Listeners in VMS Basic
Arne Vajhøj
arne at vajhoej.dk
Fri Jul 16 20:30:54 EDT 2021
On 7/13/2021 4:20 PM, Dave Froble wrote:
> On 7/13/2021 1:49 PM, Simon Clubley wrote:
>> On 2021-07-13, Dave Froble <davef at tsoft-inc.com> wrote:
>>> Perhaps it's just my illiteracy in C, but I find the code in this old
>>> database product rather easy to read. To be fair, being the architect
>>> of the product might play some part in understanding what's going on.
>>
>> No way David. There is absolutely no way the Macro-32 code is easier to
>> read than Stephen's C translation.
>>
>> If anyone else thinks the Macro-32 code is easier to read than Stephen's
>> C translation, I would really like to know why you think that. Stephen's
>> C code is far easier to understand than the original Macro-32 code from
>> David.
>
> Maybe for someone familiar with C, and not so familiar with Macro-32.
A HLL is generally more readable than assembler:
* descriptive variable names instead of register names
* structured blocks with indentation instead of gotos making it
easier to see the code flow
* control structures and expressions that are natural for English/Math
compared to opcodes
* fewer lines which again makes it easier to see the code flow
And then there is the numbers. There are XX million developers
that know C style languages (C, C++, Java, C#, PHP etc.). There
are probably like a thousand developers that know Macro-32. That
also means something for future maintenance.
> Regardless, the topic was about comments, and the Macro-32 example is
> commented enough to allow readers to understand rather quickly what is
> happening.
But half of those comments are there to compensate for the
lacks in Macro-32.
Arne
More information about the Info-vax
mailing list