<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16608" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"
bgColor=#ffffff>
<DIV><FONT face=Arial size=2>No I dont want a module to contradict itself.
</FONT></DIV>
<DIV><FONT face=Arial size=2>That would be like (letrec ((a 1) (a 2)) whatever)
which is not allowed. That's perfectly allright for me. I would not want it to
be allowed.</FONT></DIV>
<DIV><FONT face=Arial size=2>A module is not top-level, it is module top level,
quite another species.</FONT></DIV>
<DIV><FONT face=Arial size=2>Jos</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=matthias@ccs.neu.edu href="mailto:matthias@ccs.neu.edu">Matthias
Felleisen</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=jos.koot@telefonica.net
href="mailto:jos.koot@telefonica.net">Jos Koot</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Cc:</B> <A title=plt-scheme@list.cs.brown.edu
href="mailto:plt-scheme@list.cs.brown.edu">plt-scheme@list.cs.brown.edu</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, February 29, 2008 8:10
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [plt-scheme] redefinition in
module</DIV>
<DIV><BR></DIV>
<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: 0px">_________________________________________________</DIV>
<DIV style="MARGIN: 0px"><SPAN class=Apple-converted-space> </SPAN>For
list-related administrative tasks:</DIV>
<DIV style="MARGIN: 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="MIN-HEIGHT: 14px; MARGIN: 0px"><BR></DIV>
<DIV
style="MARGIN: 0px">--===============1036147421==--</DIV></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>