<div dir="ltr">Marc & list,<div><br></div><div>Before getting into a specific response, I wish to re-emphasise the high priority I feel this topic has. So better something now than something slightly more perfect in couple years.</div><div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-23 2:57 GMT+07:00 Marc Feeley <span dir="ltr"><<a href="mailto:feeley@iro.umontreal.ca" target="_blank">feeley@iro.umontreal.ca</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">There are two things I don’t like about this extension to the reader.  The implementation unconditionnaly throws away the location information (the “unwrap”) that could be useful if the form being read contains code.  I understand that this is probably what you want when the form is treated as a literal constant, but this is not always the case.<br></blockquote><div><br></div><div><span style="background-color:rgb(234,209,220)">I agree that could be useful. Perhaps unwrapping could be exposed to the user too, via an argument (do-you-want-the-value-unwrapped?) and/or traversal routines (access-this-or-that-slot-in-the-wrapped-object).</span></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Also, it opens the door to add custom syntax that may clash with future extensions to Gambit's lexical syntax.  While it is good to have hooks to extend Gambit, it would be good if such extensions have some support from the community (in other words, do other people think this is the best way to extend the lexical syntax).<br></blockquote><div><br></div><div>Sure.</div><div><br></div><div>We (you+community) are the ones to make up our minds about this now.</div><div><br></div><div>The clashing problem shouldn't be too bad though - the sexp format is set in stone already. So I guess the worst thing would be if Gambit would introduce some extension later, that <span style="background-color:rgb(207,226,243)">an individual user would get to a place of NOT wanting to overlap at the time then, and so hence his need to remap that new Gambit feature to another hash sequence in order to be able to use it, and that would cause suffering, confusion etc. for that particular user and all his followers, then - </span></div><div><span style="background-color:rgb(207,226,243)"><br></span></div><div><span style="background-color:rgb(207,226,243)">That's the problem surface (and also not worse than that).</span></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I remember SRFI 10, which is an extension to the lexical syntax with similar goals, and also the JazzScheme syntax for literal constants, i.e. {typename …}.  Perhaps something like that would be better to avoid a proliferation of different syntaxes for the same thing.</blockquote><div><br></div><div><span style="background-color:rgb(255,242,204)">What options do we have on the table?</span></div><div><br></div><div>I like the "#C(typename slot1 slot2 ...)" form (with a simpler "#Cdatum" variant).</div><div><br></div><div><span style="background-color:rgb(244,204,204)">My patch</span> leaves the C letter to be chosen by the user, so also it could be used to implement regexp forms e.g. #/regexp/ , etc., so it <span style="background-color:rgb(244,204,204)">has a more wide, general utility.</span></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Also there are interesting “bootstrapping” issues such as the need to define the type before using the extended lexical syntax.  It would be nice if literal constants could be used in the same file that defines the types (i.e. no phasing problem).<br></blockquote><div><br></div><div>Sure. But wait, can't you extract the current input port and from that in turn the readtable - so <span style="background-color:rgb(207,226,243)">at least as long as the custom form is installed using <span style="color:rgb(80,0,80)">|##readtable-char-sharp-</span><span style="color:rgb(80,0,80)">handler-set!|, then there is in actuality no problem?</span></span></div><div><span style="color:rgb(80,0,80)"><br></span></div><div><span style="color:rgb(80,0,80)"><br></span></div><div><br></div><div>Personally I think my thought highlighted in red above creates a rather strong, wider argument for that something functionally like I suggest should be introduced, even if perhaps it won't be used primarily for custom types later on - and the blue text perhaps reinforces that additionally. So like to sum it up it has a general purpose and it's simple.</div><div><br></div><div><br></div><div>The bigger question on this topic perhaps is what I highlighted in yellow above, that is, <span style="background-color:rgb(255,242,204)">what options do we have at hand for syntaxes for used-defined sexp extensions?</span></div><div><br></div><div>Do you feel that we should give a look at that before making up our minds about this particular?</div><div><br></div><div><br></div><div>Also, do you have any thoughts on how the wrapping aspect can be addressed (purple)?</div><div><br></div><div><br></div><div>Would be great if we could clarify this point within 3 weeks from now :D</div><div><br></div><div>Thanks :D</div><div><br></div></div></div></div></div>