[Info-vax] Coding with/without RDBMS
Simon Clubley
clubley at remove_me.eisner.decus.org-Earth.UFP
Fri Oct 15 14:17:42 EDT 2021
On 2021-10-14, Dave Froble <davef at tsoft-inc.com> wrote:
> On 10/14/2021 2:06 PM, Simon Clubley wrote:
>>
>> Having compared the two programs, I find the Pascal version to be
>> a lot more readable and easier to follow than the Basic version,
>> although Arne does put his begin statements in a strange place... :-)
>
> Yeah, Arne's code had lots of comments to explain things. Not!
>
> I'd really be interested in what parts of the Basic code was so bad?
>
In addition to what I have already said, Arne's control blocks feature
indented code, while all your code is at the same indentation level.
Indenting code within control structures makes the code much easier
to read.
> I do realize that since you are not familiar with DAS and it's implementation,
> and my library routines, which would not be understood. That's normal.
>
>> The Basic version has much more jumping around and just doesn't read
>> as well as the Pascal version does.
>
> I really resent that claim. With a few exceptions, mainline code is pretty
> much straight through, and for someone who seems to like scripting languages
> with all their library routines, placing specific in subroutines should
> seem rather natural.
>
Even in scripting languages, you have the Pascal style control structures
and indentation of code. That makes a major difference in readability.
> I'm a really big fan of modular code.
>
> My IDE is a big fan of things having a place, and things being in their place.
> Much of what you call jumping around is actually the IDE pulling in pieces of
> code to perform specific functions. I'm guessing if I had pulled in the forms
> control stuff, which is used for paging in reports, you'd be even more confused.
> But it works great, and doesn't have to be re-written for every program. Such
> also avoids coding errors.
>
>> BTW, Basic really does like spewing its special characters onto the
>> end of variable references. :-)
>
> And other languages don't have such quirks?
>
In general, not to that extent, although PHP likes its prefix character.
>> One thing I was surprised by was the goto and gosub to integer line
>> numbers instead of looping constructs and named function calls with
>> parameters as you see in the Pascal example and in other languages
>> such as C and Ada.
>
> I've seen people attempt to jump through many difficult hoops to attempt to follow
> some coding standard. Doesn't make any sense to me. There are perfectly logical
> uses for both GoSub and GoTo. Such as just throwing out the anchor if fatal errors
> occur. Moving special functionality out of the mainline code makes it more readable,
> for me.
>
> Did I mention I don't like C, and most likely would not like Ada?
>
> Got to ask, just what do you think a NEXT, WHILE_END, and such statements do?
> Sure looks like another form of GoTo to me.
>
Is code within these blocks written at an extra indentation level in
DEC Basic ?
It is in other languages with their control structures and it makes
the code much easier to read.
Simon.
--
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
More information about the Info-vax
mailing list