Subject: Re: Destructive Side Effects From: Erik Naggum <firstname.lastname@example.org> Date: Sat, 17 Nov 2001 23:10:01 GMT Newsgroups: comp.lang.lisp Message-ID: <email@example.com> * "David McClain" <firstname.lastname@example.org> | Actually, this is one of the surprising things about REMF that caught my | attention. You are correct that most often destructive operations in | Lisp operate in a functional manner... except for REMF (and no doubt a | few others...) Why this _completely_ irrelevant hangup? If properties were implemented with a hashtable, would you complain that remhash does not return a new hashtable instead of modifying the one you passed, too? Oh, no, now you will complain about remhash. What have I _done_? Now Common Lisp will crumble because property lists _and_ hashtables are mutable objects. Have you noticed that when you intern a symbol in a package, you do not get a new package? Or that when you read a character off a stream, you do not geta new stream? Or that when you write a character to a stream, which modifies a file on disk, you do not get a new disk? That you think REMF is "destructive" is only because you are looking at things at too low a level for your own good and abuse the implementation detail that it is a list, which is again because you have not quite figured out how to get what you want from the language. Even in your "side-effect-freeness" you actually modify memory cells in your computer, you know, but you would most probably argue that this is irrelevant to the side-effect-freeness nature of your programming language, right? Well, side-effect-free is actually _nothing_ but perspective. You only have a problem understanding how (Common) Lisp works. Once you get that understanding, you will either be the type who gripes about some feature you do not like for the rest of your life, or you will be the type who can make a more informed choice about which language you want to spend your time on, and then leave the rest alone. I really wonder what it is with Common Lisp that makes people first discover the language and then start to make up so many stupid problems with it just because they have some serious personality problems. I mean, _none_ of the standard conditionals are usable by some dude, and now remf is "destructive" and that by itself ticks some other troll off. Sheesh. /// -- Norway is now run by a priest from the fundamentalist Christian People's Party, the fifth largest party representing one eighth of the electorate. -- Carrying a Swiss Army pocket knife in Oslo, Norway, is a criminal offense.