Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!asuvax!ncar!hsdndev!husc6!soi!chip From: chip@soi.UUCP (Chip Morris) Newsgroups: comp.lang.scheme Subject: Re: Why memq vs memv vs member, etc.? Message-ID: Date: 20 May 91 13:30:46 GMT References: <1991May15.172635.18635@Think.COM> <1991May18.045823.9174@Think.COM> Organization: Software Options Inc., Cambridge, Mass. Lines: 43 In reply to my remark >>I think that a Schemer's valid excuse should be "oh, my program >>doesn't change the meaning of EQ, CAR, etc." And maybe s/he should be >>able to rely on analysis tools to assert this to a compiler in the >>bulk of cases where it can be deduced. barmar@think.com (Barry Margolin) writes: >But it frequently can't be deduced statically. Any call to load (or eval, Of course, all bets are off after calls to LOAD or EVAL. However, I found it not too hard to write a rather large program without ever mentioning either. I sure would like to have reasonable analyzers. Indeed, in his reply to my point >>To consider another example, isn't Scheme's somewhat unbridled >>treatment of first-class continuations something of an analysis >>nightmare? Mr. Margolin says >Yes, but it is possible to analyze many of these cases statically. A >static analyzer can detect when a procedure *is* redefined, but it rarely >can determine that a procedure *won't* be redefined. Part of the problem is that people seem to advocate an all-or-nothing solution. The existence of LOAD or EVAL is first used to pooh-pooh the idea of analysis tools to guarantee certain invariants about a program. But maybe I'm willing to write to coding standards (statically verifiable?) that permit such tools to work. Shouldn't we permit, if not encourage, such practice? Surely one could defeat the tools used to analyze continuations, too. But why stop hold up the wagon train for obscure usages when a huge amount of useful work could be done on behalf of (analytically) simple programs that could benefit from analysis and attendant optimization? -- Chip Morris, Senior Engineer Software Options, Inc., 22 Hilliard St., Cambridge MA 02138 (617) 497-5054 chip@soi.com