Subject: Re: Servlets in CL From: Erik Naggum <email@example.com> Date: 2000/06/09 Newsgroups: comp.lang.lisp Message-ID: <firstname.lastname@example.org> * Joe Marshall <email@example.com> | Erik raises a good point, but there are drawbacks to using plists | even in this situation. Since symbol plists are a global structure, | they share the same drawbacks as any other global structure, like a | global variable. I'm sure it's possible to view them this way, but _why_? This looks like unfounded fear to me, and I'm not at all sure how to respond when the technical issues at hand seem completely irrelevant. Are global variables unilaterally and universally _bad_, now? Furrfu! | There is no way to manipulate properties as a collection, however. | It is difficult, for example, to enumerate all symbols with a | particular property, or to maintain two sets of properties with the | same name. The latter is obviously solved by the package system. The former is the same problem as finding all the keys that have values in a hash table which match certain criteria. If you have such a need, you cater to it by using something else. If you don't have such a need, you don't need to do something else. Contrary to what nearly every Scheme proponent will react as if he meant, we do not deal with the fully general abstract notion of a program, but an actual program that has a number of real-world constraints. If using property lists would lead to problems, smart people use something else, but Scheme proponents conclude that it is problem-laden and will never use it even when there are no problems. | A particular example is in a compiler. Many compilers put | properties on symbols indicating how to process forms with these | symbols. However, when you want to retarget the compiler, you have | problems. You must replace the properties that the compiler is | looking for with a new set, but doing that makes the compiler | useless for the current machine. There is no easy way to say `ok, | do the compile, but use a non-standard set of properties'. If there | were instead an explicit table rather than an *implicit* one | scattered about the environment, it would be trivial to hand the | compiler a different set of special symbols. Or you could be sufficiently smart and use one level of indirection in the properties: The code does not reference properties by a constant value (symbol), but by the value of a global symbol. I'm sorry, but I"m not into this "let's find one more ridiculous problem with something I don't like" game. If you enjoy such games and impractical purity, Scheme is for you. If you are smart enough to deal with the real world in its sometimes messy complexity, stay with Common Lisp and observe that unlike static typing and Scheme proponents, other programmers trust that you have a working brain and know when using a practical, useful mechanism is a good idea and when it is not. Smart people never listen to those who claim that something is always bad or always good, anyway. #:Erik -- If this is not what you expected, please alter your expectations.