Re: equality types in SML Basis Library (fwd)
Matthew Fluet <[email protected]>
| Newsgroups | gmane.comp.lang.ml.mlton.user |
|---|---|
| Message-ID | <CAMrhFL6qNqHohaZLtidZ8UJ4zsvg2V1thyQB++YLCgDKZkAgLQ@mail.gmail.com> |
Not that this message is off-topic for mlton-user, but it was in response to a discussion that was started on mlton-devel, and I should have forwarded the message there. Follow the link in my quoted e-mail to see the original discussion. On Tue, Dec 3, 2013 at 11:24 AM, Matthew Fluet <[email protected]> wrote: > > Some thoughts from John Reppy on the equality status of substrings, and > mono vectors and slices. > > ---------- Forwarded message ---------- > Date: Mon, 2 Dec 2013 17:08:50 -0600 > From: John Reppy <[email protected]> > To: Matthew Fluet <[email protected]> > Subject: Re: equality types in SML Basis Library > > The following is based on memory, but I probably still have the email record somewhere. > > For slices, I think that that we decided that they should not be equality types > because of the potentially surprising behavior of something like > > (Substring.substring("abc", 1, 1) = Substring.substring("xbz", 1, 1)) > > Substring.compare returns EQUAL on these, but if you call Substring.base, you get unequal > results, so they are not structurally equal. > > For monomorphic vector types, I think that they should all be equality types, except > for Real vectors (i.e., when their element type is an eqtype). All array types should > be equality types (and the "array" type constructor should be treated like "ref"). > > - John > > > On Dec 2, 2013, at 2:10 PM, Matthew Fluet <[email protected]> wrote: >> Hi John, >> >> Henry was noticing some inconsistencies between MLton and the SML Basis >> Library specification with respect to equality status of substrings, and >> mono vector and vector slices: >> >> http://sourceforge.net/p/mlton/mailman/message/31662605/ >> >> Any thoughts? Was it intentional that the monomorphic vectors (other >> than CharVector) do not have equality status? Similarly, was it >> intentional that substrings do not have equality status? >> >> -Matthew > > To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk > _______________________________________________ > MLton-user mailing list > [email protected]; [email protected] > https://lists.sourceforge.net/lists/listinfo/mlton-user To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. ------------------------------------------------------------------------------ Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk