[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] Mutable Pairs



On Jun 14, David Rush wrote:
> On 14 June 2010 16:27, Eli Barzilay <eli@x> wrote:
> 
> > On Jun 14, Brian Harvey wrote:
> >
> > language to support teams of 500 lousy programmers.
> >
> > What I understood from David is that when he uses `map' in his
> > code, he will never pass it a function that is not his too.
> 
> No. I simply never expose an encapsulated list structure to
> potentially malicious code. That is not the same thing as your
> understanding.

So if you implement a gui framework, you either don't do callbacks, or
you declare the library as one that works with good code only?


> If a user of one of my libraries wants to make their own list of my
> objects and then clobber its structure that's entirely her own
> business, but I don't provide access to *my* lists through *my*
> APIs.

And this reduces lists to a kind of to data that is either used
internally in your code only, copied whenever you want to talk to
other code.


> > Seems that I need to repeat this a fifth time:
> 
> No, you don't. You have advocated a position which actually
> *removes* the ability to mutate one of the two basic aggregate types
> in Scheme.

Yes: removes the ability to mutate it, but not remove mutation.  But I
didn't really advocate for that, knowing how unlikely it is.  What I
was hoping to see is a shred of acknowledgment that immutable data is
preferrable when possible.  That having mutable pairs as a default is
mostly a matter of legacy and compatibility.  That somehow Schemers
are not completely stuck in the 80s.  The pretentiousness of generally
denying any value in immutable data is, IMO, astonishing.


> > currently (RnRS) Scheme is guessing wrong in >99% of the cases,
> > and it makes it extremely hard for me to correct it.
> 
> This is FUD. The occurrence of the class of bugs for which you have
> highlighted the potential is *far* (orders of magnitude) lower than
> this.  You have a point, and it is a real problem from a provability
> standpoint,

(And that's the pretentiousness.  I started by saying that I have no
interest in provability.)


And now you can dismiss this with a "Puh-lease", and Brian can
conclude with "Pfui".

(And this is my bus stop.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

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