This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new!

problem with silly perl characters

Posted by: Anonymous [ip:] on April 07, 2008 10:33 PM
Suppose your code uses an array. You write a bunch of code that assumes you are using an array. The design takes a turn and now this same variable would do a much better job as a hash. This is the kind of refactoring problem that happens all the time. So now you have to pick over your code and change the array to a hash. If you miss something, it may even compile, but it sure won't work. In LISP this would not have been a problem because variables are typeless in the program text (they DO have types in the runtime), and besides, hashes and arrays are semantically identical. You put stuff in and get stuff out with a key. So what if the key is integer or float or string or what. This is the same as the equally stupid Hungarian Notation that Simonyi from Microsoft introduced with LPWORD and the like, creating code that needed extensive modification to compile on a 64-bit or big-endian platform.


Return to It's time to learn Scheme