|C source language database roedy@BIX.com (1994-08-17)|
|Re: C source language database firstname.lastname@example.org (1994-08-19)|
|Re: C source language database email@example.com (1994-08-23)|
|From:||roedy@BIX.com (Roedy Green)|
|Keywords:||C++, design, comment|
|Organization:||Canadian Mind Products|
|Date:||Wed, 17 Aug 1994 17:23:14 GMT|
I have been using Forth and my own language Abundance these last 15 years.
For financial reasons I had to take a job for someone else using C++ and
Windows. It is like programming under water. Everything is so verbose and
the simplest things take pages and pages of code. Compilations take hours
that I am used to handling in less than a second.
You can't just change the C++ language to suit your problem, so I began to
wonder what could be done to help if source code were stored in DATABASE
form rather than a raw text file.
Some of the features I thought would be possible once you store your
project in a database are:
GUI display of loops and nests with lines and blocks -- like a flow chart.
GUI display of expressions using variable sized parentheses to make eyeball
matching easier -- set them mathematical Tex style e.g. with division as
line with numerator on top. Precedence could be visually much more
obvious. You could configure just how much parenthesizing you want to see,
depending on how much you trust your knowledge of the precedence order.
Outline processor type collapse/expand of detail -- including expanding
into body of a function from any of its calls. Collapsed pieces leave
structured comment "Chesire smiles" behind. Details of variable definition
is expandable from any use of a variable. e.g. in collapsed form a for
loop might say "for each widget" or "for all posted transactions"
Fuzzy name search. That would add at least an hour to my day.
Point and shoot at lists of names currently in scope instead of typing
them. Palettes of recently used names, or names most likely to be used in
a given context. Palettes of names of things most closely related to
something you point to -- in the Magellan sense of often seen in each
Tracking and ticking off all uses of a given variable or function. You
might do this prior to or during making an interface change.
Use of colour, font, and typeface to highlight whatever is currently of
interest -- colour encoding of types or function/variables undergoing
Global safe renaming even when many programmers are currently working on
parts of the code that need renaming. Usually global renaming in
impossible because other programmers have parts of the project locked.
Private short names. Use names that are mnemonic or easy to type for YOU.
No one else has to see them.
International language support in source code, commentary, and end product.
Soon we may have international project teams.
PVCS version control without locking. JOBS (a related suite of changes to
many modules) can be applied or removed from the entire body -- all
programmers work on the same database, able to hide or reveal other's
Very fine tracking on what has recently changed for intelligent MAKE. None
of this nonsense of recompiling the universe because you added a comment to
a universally included *.H file.
Browse/cross reference that is always up to date.
Background continuous recompilation.
Interpretive debugging with tons of additional safety checks built in.
Code generation for common tasks like building Windows dialog boxes.
Once you have a database, you have a much tighter handle on your source
than if you try do to these same things on the raw text.
I wondered what products currently exist that do anything like this,
including traditional smart text editors. I'd like to try them out to see
if any of these ideas are indeed useful. My main concern is the lack of
ability to cut and paste, and have a temporary mess than looks nothing like
valid C++ code.
I also wondered how I might demonstrate the concept quickly, by gluing
together bits of existing stuff. In particular, I would need a C++ parser
to import existing C++ source that could let me ALSO extract the comments
and put them into a more structured form -- just what they apply to, and
what level of detail they represent. I would also need some way of storing
this multi-user tangled web with persistent objects.
[A lot of these are available in CASE environments. -John]
Return to the
Search the comp.compilers archives again.