My philosophy at the moment is to provide the semantics we want to the user - for example, logical immutability, if that's what we want. So a user facing view with a reference implementation (that is useful) for the moment. Then, we'll work with the compile guys with a view towards efficiency. If the immutability is what we think will get us to that ultimate goal, then that's what the user view should encompass. <br>
<br>There are other places (for example my inference collection rewrite) where I'm focusing on immutability with the hope of getting multicore benefits some time in the future.<br><br>Doug<br><br><div class="gmail_quote">
On Fri, Aug 14, 2009 at 7:32 AM, Noel Welsh <span dir="ltr"><<a href="mailto:noelwelsh@gmail.com">noelwelsh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Certainly there has to be mutation at some level. Immutability at the<br>
user's level means no arrays can alias. Given this a compiler can<br>
reorder array traversals to take advantage of the cache and multiple<br>
cores. This is, AFAIK, the key to high performance on modern machines,<br>
and the key optimisation SAC does on its comprehensions. OTOH it does<br>
require quite some compiler machinery to exploit.<br>
<br>
N.<br>
<br>
On Fri, Aug 14, 2009 at 1:54 PM, Doug<br>
<div class="im">Williams<<a href="mailto:m.douglas.williams@gmail.com">m.douglas.williams@gmail.com</a>> wrote:<br>
</div><div><div></div><div class="h5">> You give me more credit for forward thinking than I deserve. I was planning<br>
> on having array-set!. I'm not sure how to avoid it at the primitive level -<br>
> I just won't have enough information at the time I create the underlying<br>
> vectors to make them immutable (and there are no immutable SRFI vectors that<br>
> I'm aware of). Of course, that doesn't mean I have to expose the underlying<br>
> vectors or array-set! in the interface. That would make them logically<br>
> immutable, but not in a manner than helps the GC system, for example.<br>
</div></div></blockquote></div><br>