[Coco] C VS Basic Coco
Francis Swygert
farna at att.net
Sun Feb 18 10:12:45 EST 2018
Date: Sat, 17 Feb 2018 11:10:53 -0500
From: Lee <leep at tigerbase.com>
I've been watching this thread and trying not to jump in much since Iprogram in C#/JavaScript (web and Node.js) and believe very strongly in
Robert "Uncle Bob" Martin's "Clean Code" philosophy (
https://www.goodreads.com/book/show/3735293-clean-code). My opinions are,
by definition, opinionated. They are biased away from unstructured
languages, like older BASIC (I've said before I don't know enough about
BASIC09 to form an opinion of it), and toward structured languages like C++
and C#. The ability to descriptively name functions and variables, scope
variables tightly (even JavaScript/ECMAScript has added block scoping to
variables where it used to be only function scoped), and organize code
(classes, compiled libraries, code in separate files/folders, etc.) goes a
long way toward code maintainability.
The end users of the software we write are indeed concerned about
performance. However I feel they are also concerned about stability. If
the software is blindingly fast, but crashes, or loses their data, or the
enemy ship suddenly moves through a wall they shouldn't have been able to,
that's a major problem. Maintainability of code and the ability for new
developers (or you in 5 years) to understand it quickly is extremely
important to the ongoing the stability of the code in the long run. For
these reasons, myself, I prefer to program in a more structured language
than DECB (again, I don't have any experience with BASIC09 to know if it
supports classes or tight variable scoping, etc.).
I'm returning to my lurking intravertial shadows now. :)===================================================
Maybe you should comment more often... all good points. I "structured" my BASIC code back in the day as much as I could by using specific number ranges with comments for subroutines and such. Made it easier to maintain the software -- as you mentioned. The way C and others structure with indents and brackets is a bit confusing to me, but if I actually sat down and learned the language I'm sure it would start to make a lot more sense! Descriptive names for functions and variables rather than being limited to a couple characters is a great advantage -- would have to have a comment line for something like that in DECB (which I did). Sort of the difference between the 8 character and long file names... a HUGE difference!!
Frank Swygert
Fix-It-Frank Handyman Service
803-604-6548
More information about the Coco
mailing list