> From: David A. Green
> I've always commented my program at the beginning, but 
> some programs have many changes and when we have 300+ 
> lines of comments it gets a little tedious to deal 
> with embedded in the source code.
> 
> I'm think of placing them in an external file and then 
> doing a $INSERT in the source code in order to tie 
> them together.
> 
> How do you handle the long comments?


I've often thought of this as being a problem with both the
language and the editors that we commonly use.

Typical MV editors show all code.  There is no provision for
folding content or "outlining".  For example, in C# we can do
this:

#region Initialization
// lots of comment lines here
// variable definitions, code, etc
#endregion

In Visual Studio that collapses to a single line:
+    Initialization
We can click the plus sign to open it up and see the entire
section.
Other editors support this feature for different languages.

Code can be nested:
#region Main Section
#region Define Variables
// definitions here
#endregion vars
#region Major Function 1
// code here
#endregion functions
#endregion main

Again, that collapses to something like this:
#region Main Section
+  Define Variables
+  Major Function 1
+  Major Function 2
#endregion main

Or collapses entirely to:
+  Main Section

But with MV BASIC the language doesn't support this unless we use
a pre-processor, and even then we don't have editors that
recognize the constructs.  The best we can do is to use something
like this:
*!+ This starts a region
*   code here
*!- This ends the region
But then we need an editor to support it.  And that brings me
to...

<a minor rant>
I was writing a new MV Editor to support this and many other
features highly desirable to MV developers.  But as with many
projects where people would inevitably demand a free solution I
decided to put this project on the shelf indefinitely.  It's just
not worth it to try to improve our lot here.  Since people are so
fond of open source freeware I'll suggest that the source code is
available for people to enhance to recognize code as defined
above.  That's the spirit of open source - we're supposed to give
as much as take.  If no one wants to enhance one of the fine FOSS
utilities out there, then it seems we'll simply never have the
functionality.  People all too often confuse free=liberty with
free=beer.  They want the software to be free-of-charge but we
rarely see people publishing MV-specific enhancements to open
source code as a contribution to the community.  It's this
condition that causes us to continually lose sites to the
mainstream world as people wonder why our development practices
are so primitive.  C'est la vie.
</>

Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to