[Haskell-cafe] idea for avoiding temporaries

Thomas Conway drtomc at gmail.com
Thu Mar 8 19:48:27 EST 2007


On 3/9/07, David Roundy <droundy at darcs.net> wrote:
> Nothing is being done concurrently, so I don't see what STM would gain us.
> What is it that you're thinking we could gain from STM?

Its shiny and new, so it will make your code look sexy? :-)

So what happened to linear types? I remember reading Once Upon A Type
and Linear Types can Change the World during my hons year (and that
was more than 10 years ago). Mercury uses linear modes which are much
the same.

One of the arguments Fergus Henderson made was that in the case of
arrays, the update cost if you have to copy is too much, so you use
linear types/modes to make it impossible to do so. While you can
debate the pros and cons, the fact that a trivial "mistake" in your
program could change it from using in-place update to using copying
does lend weight to the argument for distinguishing the copying and
non-copying forms at the type level.

cheers,
T.
-- 
Dr Thomas Conway      You are beautiful; but learn to work,
drtomc at gmail.com         for you cannot eat your beauty.
                                              -- Congo proverb


More information about the Haskell-Cafe mailing list