chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Fix list->queue data corruption issue


From: John Cowan
Subject: Re: [Chicken-hackers] [PATCH] Fix list->queue data corruption issue
Date: Thu, 3 Oct 2013 12:08:00 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

Peter Bex scripsit:

> > Insert rant here about the use of unsafe procedures from Scheme code
> > for the sake of tiny and probably imaginary efficiency improvements.
> 
> That's bullshit.  In the general case, the performance improvements of
> unsafe code are measurable.  

Well, "imaginary" was an exaggeration, but what's a rant with no
exaggerations?  The fact that it's measurable doesn't mean it *matters*.
My real point is that speed-vs-safety tradeoffs should be made with care
and consideration, not by defaulting to the fastest thing in every case.
Doing that is equivalent to presuming that code is bug-free until proven
otherwise, aka cowboy coding.

The other main reason to avoid unnecessary use of internals is that they
are undocumented, so the code is harder to understand, brittle in the face
of internal changes, and requires Chicken-internals-specific knowledge
rather than just Chicken Scheme knowledge or just R5RS Scheme knowledge.
(It's also fugly IMO to have all those #####s in your code.)

> Of course, in this particular case I'd agree ##sys#make-structure is
> completely gratuitous and should probably go away.  I'd prefer to change
> such things in a separate step if we decide to do so (which is a whole
> other discussion).  As it is, this patch fixes a real issue.

Oh yes, I'm not opposing the patch at all: wrong is wrong.  I'm just using
it to raise an issue I think matters: gratuitous use of unsafe/internal
procedures.

> CHICKEN is about avoiding bullshit overhead and bureaucracy, so that
> would actually be a Bad Thing in this project.

Not all overhead is bullshit overhead.  There's overhead in examining
salmonella output, in signing off on patches, etc. etc., but we've learned
the hard way that it's necessary overhead.  Everyone makes misteaks,
and adding a few IHTAT commments isn't so bad.

-- 
John Cowan        http://www.ccil.org/~cowan          address@hidden
Please leave your values                Check your assumptions.  In fact,
   at the front desk.                      check your assumptions at the door.
     --sign in Paris hotel                   --Cordelia Vorkosigan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]