Plans for TR support for generic interfaces down the road? <div><br></div><div>(: add (All (K V [M <: (Gen:Dict K V)]) M K V -> M)) <br><div><br><div class="gmail_quote">On Sun, Aug 19, 2012 at 6:11 PM, Asumu Takikawa <span dir="ltr"><<a href="mailto:asumu@ccs.neu.edu" target="_blank">asumu@ccs.neu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2012-08-19 11:20:01 -0700, Ian Tegebo wrote:<br>
> Thanks for the clarification; I needed both `stream-cons` and<br>
> `in-producer` examples. Also, your tone regarding the stream API<br>
> suggests there might be ongoing work and/or other interesting details.<br>
> If so, could you elaborate?<br>
<br>
Sure. Vincent and I have been working on improving various aspects of<br>
generic operations in Racket. In 5.3, we introduced a general mechanism<br>
for defining a generic interface and implementing its methods (see<br>
`gen:stream` for streams, for example).<br>
<br>
We have some ideas floating around for introducing an extended generic<br>
interface for datatypes that are "buildable"[1]. That is, you'd provide a<br>
construction operation so that operations like map, filter, and so on<br>
could produce the same type of thing (whereas with streams and sequences<br>
now, they produce an "opaque" thing).<br>
<br>
This is still very much a work in progress, but hopefully we'll have<br>
something more concrete soon.<br>
<br>
Cheers,<br>
Asumu<br>
<br>
[1]: my understanding is that Scala provides this kind of functionality<br>
with its generic package for collections:<br>
<a href="http://www.scala-lang.org/api/current/index.html#scala.collection.generic.package" target="_blank">http://www.scala-lang.org/api/current/index.html#scala.collection.generic.package</a><br>
____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
</blockquote></div><br></div></div>