I find myself using magic numbers a lot in my python experiments
eg: I'm writing a relational algebra interpreter++, based on some
of my theoretical work in databases and I find myself having
to remember that ps[i][1] is the subschema for tuple i whereas
ps[i][0] is the name of the tuple variable for tuple i
I'd like to be able to replace 1 and 0 by something more
readable, but I don't want the interpreter to have to do a
variable look-up. Actually, I hate magic numbers enough I think I'll
live with the variable lookups, but, couldn't symbolic constants be
easily implemented in the language?
Let me know if I'm missing something...
Aaron Watters
Department of Computer and Information Sciences
New Jersey Institute of Technology
University Heights
Newark, NJ 07102
phone (201)596-2666
fax (201)596-5777
home phone (908)545-3367
email: ·····@vienna.njit.edu