Re: [Scheme-reports] 6.4 control features: -map and -for-each procedures John Cowan 21 May 2011 21:09 UTC

Andy Wingo scripsit:

> Right, control features.  I already mentioned the
> multiple-return-from-mapping proc issue before.  There are three
> options that I am aware of:
>
>   1) Ignore the issue.
>
>   2) Specify that a second return from a mapped procedure cannot
>   affect the data structure returned by the first return.  Effectively
>   prohibits the build-it-backwards-and-reverse-in-place idiom, though
>   you may reverse and form a new list.
>
>   3) Specify that it is an error to return multiple times.

I have filed a ticke for choice 3.  I don't see that anyone will want 2,
especially for string-map and vector-map.

> Suggestion: that it be an error for a mapped procedure to mutate the
> list being mapped.

Ticket filed.

> Also, what is the motivation for having multi-arg `map' terminate at
> the first empty list?

Compatibility with the widely accepted SRFI 1.

>   5) You'd need blob-map to be complete, for this report...

Ticket filed to complete blob.

> Suggestion: remove vector-map, string-map, and their for-each
> procedures from the WG1 report.

The WG1 charter says:  "Self consistency is an important objective,
which may require adding new features."

--
John Cowan  <cowan@ccil.org>  http://www.ccil.org/~cowan
        Raffiniert ist der Herrgott, aber boshaft ist er nicht.
                --Albert Einstein

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports