[plt-scheme] reading a whole file

From: Ernie Smith (esmith at acanac.net)
Date: Mon Nov 10 10:36:58 EST 2008

Shriram Krishnamurthi wrote:
> [This is really just a response to Richard, who seemed to be arguing
> against such primitives.  The "optics" argument is actually stood on
> its head here: my hand-written code is the 80...let's call it 60%
> solution, because it does no error-checking, probably doesn't handle
> Unicode, certainly doesn't care about automicity due to assumptions
> about myself, etc.  At any rate, given that this is *not* being used
> in a compositional manner, the 80% solution of reading the file into
> memory, processing it, and writing it back out seems to me just the
> right thing.  Counter-argument?]
I reject the assumption:

'this is not being used in a compositional manner'

Your argument can be distilled to:

   sloppiness is valid sometimes.
   I prove the point by writing a sloppy program
   and using it to my advantage immediately
   after writing it, knowing full well
   its limitations, ergo the optics
   argument is disproved.

There is an implicit assumption of the optics argument
that it applies to cases which *can* be used in a compositional

1- Therefore we can filter out all counter arguments which require
the 'non compositional assumption'.  So We can consider your argument 
filtered out.

2- Although sloppiness can be useful, it is never be 're-useful'.
're-useful' programs should be given priority when deciding on
the merits of a primitive.

Posted on the users mailing list.