Noel Hunt <noel.hunt(a)gmail.com> wrote:
|If you want to see a nice use of a restricted subset of C++,
|that is, code written in the early days before the accretion
|of hideous excrescences, I highly recommend Tom Cargill's
|'pads'. You will find it in the 10th Edition distributions.
I downloaded it from [1]
[1]
http://www.softwarepreservation.org/projects/c_plus_plus/application/applic…
|It is a typical blit-style program, with a 'terminal' and
|'host' portion, the 'host' portion being written in the said
|restricted, earlier form of C++.
Yes, that package looks good. Two nice things in 5 minutes:
if( !this ) return 0;
I would like to read "references are needless" into that.
// C++ bug (Action)
Yes! That is exactly my gut feeling, too!
Interestingly it seems that it has been possible to apply access
policies on file level, even for preprocessor things etc.:
pri
#define PADS_VERSION 0x851021 /*
YYMMDD */
#define CARTE 0x80
#define NUMERIC 1
That i never had seen before.
Quite a lot of C++ in this package..
|The 'terminal' part is in C (this is the graphics front-end)
|but written for the blit. There was an OpenLook port by Dave
|Kowolski, and I have a version that runs under Plan9 (via
|Russ Cox's plan9port)---there is a straight-forward mapping
|of blit graphics operations to the Plan9 model.
|
|Noel Hunt
In V10 there are the sources of cfront, and also troff, pic etc.
I would wish i had more time to look through that. Most code
from these laboratories and universities is just casual, this is
what i like so much. I mean, really. Most of the elder code goes
like about
LayerReshaped();
MOUSEServe();
KBDServe();
RCVServe();
and is done with it When i started, as well as today, notational
things for namespace and (get, set) functions were in use for at
least libraries, and then i found C++ preferable over C due to
"using NAME" directives etc., whereas in C you go for
g_mount_tracker_find_by_mount_spec() and woe if the argument is "a
subclass". And pi is really a debugger!? I detest debuggers!
But he instrumented most of it with trace() and VOK by hand in
order to debug that thing. That is fantastic. I dislike so much
that today shipout code of even the smallest utility is compiled
with stack canaries enabled, the assembly looks infested, all that
should be kept in debug code, in my opinion.
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)