Aaron wrote:
[stuff deleted because it's not what I want to respond to, although I do
have opinions, then:]
| Another frequent source of bugs is use of uninitialised lvars which
| turn up as unexpected occurrences of 0. There should be a compile
| time debugging option to initialise lvars to have undef objects with
| the name of the lvar, e.g. so that a bug involving an uninitialised
| lvars fred would show up as something like "<undef 'lvars fred'>".
My personal and technical opinion is that this is more simply fixed by
disallowing uninitialised declarations, with an ``old code'' switch to
allow them (and force initialisation to a suitable undef value).
The occasions on which I have needed to declare a variable but do not
know what value to give it are so few and far between that I think it
would be better to disallow it. There is no loss of generality; one can
always write a junk value if one is *convinced* that the code cannot be
written any other way. There need be no loss of efficiency; the compiler
can optimise out those assignments when it can prove that the values
will ``never'' be seen.
| There are lots more, all of them more important than banning the use
| of vars to declare and localise simultaneously and inflicting a lot
| of trouble in people who have spent several years producing
| documentation.
How much code would it break (probably lots, and someone should write a
utility to find out) if ``vars'' declarations local to a procedure
invented a *new* permanent variable which it then dlocalised? Then the
intuition ``"vars" are local to a procedure, aren't they?'' would be
more accurately reflected.
Regards, | Applicants must also have extensive knowledge of Unix, | MIT
Kers. | although they should have sufficiently good programming | job
| taste to not consider this an achievement. | ad.
|