<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div>Would you also want </div><div><br class="webkit-block-placeholder"></div><div>;; --- </div><div>#lang scheme </div><div>(define add1 sub1)</div><div>...</div><div>(define add1 zero?)</div><div>...</div><div>;; --- </div><div><br class="webkit-block-placeholder"></div><div>to work? If not, I could see myself agreeing with you. -- Matthias</div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><br><div><div>On Feb 29, 2008, at 2:04 PM, Jos Koot wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div><font face="Arial" size="2">#lang scheme (let</font><font face="Arial" size="2"> ((add1 sub1)) (add1 3))</font></div> <div><font face="Arial" size="2">is perfecttly alright.</font></div> <div><font face="Arial" size="2"></font> </div> <div><font face="Arial" size="2">#lang scheme (define add1 sub1) (add1 3)</font></div> <div><font face="Arial" size="2">is not accepted.</font></div> <div><font face="Arial" size="2"></font> </div> <div><font face="Arial" size="2">Why?</font></div> <div><font face="Arial" size="2">The redefinition does no harm to any other imported procedure or macro.</font></div> <div><font face="Arial" size="2">That's the beauty of modules: being sure that your macros and procedures cannot be corrupted by invoking modules.</font></div> <div><font face="Arial" size="2">The restriction forces me to rename procedures and syntaxes previously not present, but now provided by #lang scheme.</font></div> <div><font face="Arial" size="2">For example, I had my own nice and more general version of syntax 'for'. I no longer can import my own 'for' without renaming.</font></div> <div><font face="Arial" size="2">And I have to rename every invocation of my for in all modules requiring my nice 'for'.</font></div> <div><font face="Arial" size="2">I think that redefinitions in a module must be allowed and must be considered to be local to the module.</font></div> <div><font face="Arial" size="2"></font> </div> <div><font face="Arial" size="2">Now what happens:</font></div> <div><font face="Arial" size="2">1: You have a fine #lang scheme program.</font></div> <div><font face="Arial" size="2">2: You download a new scheme whose #lang scheme happens to include a 'new' procedure or syntax with the same name as used in your nice program.</font></div> <div><font face="Arial" size="2">3: Or one of the required modules happens to do that.</font></div> <div><font face="Arial" size="2">4: The program no longer can be compiled.</font></div> <div><font face="Arial" size="2"></font> </div> <div><font face="Arial" size="2">Why? This is very much against the principle of scope, I think.</font></div> <div><font face="Arial" size="2">I cannot think of any implementation problem.</font></div> <div><font face="Arial" size="2"></font> </div> <div><font face="Arial" size="2">Jos Koot.</font></div> <div><font face="Arial" size="2"></font> </div> <div><font face="Arial" size="2"></font> </div> <div><font face="Arial" size="2"></font> </div> <div><font face="Arial" size="2"></font> </div> <div><font face="Arial" size="2"></font> </div> <div><font face="Arial" size="2"></font> </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_________________________________________________</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-converted-space"> </span>For list-related administrative tasks:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-converted-space"> </span><a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme">http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">--===============1036147421==--</div> </blockquote></div><br></body></html>