[m-rev.] for review: add string builder stream to extras
Ian MacLarty
maclarty at csse.unimelb.edu.au
Mon Dec 4 18:43:38 AEDT 2006
On Mon, Dec 04, 2006 at 06:18:42PM +1100, Julien Fischer wrote:
>
> On Mon, 4 Dec 2006, Ian MacLarty wrote:
>
> >On Mon, Nov 27, 2006 at 04:17:24PM +1100, Julien Fischer wrote:
> >>>Index: stream/stream_util.string_builder.m
> >>>===================================================================
> >>>+
> >>>+:- instance stream.writer(string_builder_stream, string,
> >>>string_builder_state)
> >>>+ where [
> >>>+ ( put(_, String, !State) :-
> >>>+ !.State = string_builder_state(StringList0),
> >>>+ %
> >>>+ % The string builder will never clobber the string. Also we
> >>>+ % know that nothing else can clobber the string since it isn't
> >>>unique.
> >>
> >>s/since/although/?
> >>
> >
> >No, since. I'm trying to argue that it's okay to lie to the compiler
> >here. Does my argument make sense?
>
> I see what you mean.
>
To avoid the promise we should make a copy of the string, but that would
be a performance hit.
Ian.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list