On Thu, Aug 25, 2016 at 7:07 PM, Bradley Lucier <xxxxxx@math.purdue.edu> wrote:
 
I'm asking why should [disjoint types] be mandated?

Basically because Scheme does it that way.  Why do we require that
strings and numbers be disjoint?  In Perl, Icon, and Rexx, they are
actually the same type, but at least that's guaranteed.

Suppose that arrays may, as you say, be a disjoint type or a procedure.  Then
if you write (some-array 1 2 3) instead of ((getter some-array) 1 2 3), this may
silently succeed and return some useless value if 1 2 3 are valid arguments
for the array closure.  (Granted, in an unsafe Scheme you may get a crash
or a wrong result in any case.)

 Additionally, a portable implementation can't use procedures for arrays anyway,
because of the `array?` procedure, which cannot have a portable implementation
in that case, since there is nothing you can portably do with a procedure
except invoke it.

So I think it is a good idea and costs nothing.

Interesting.  The MIT Scheme manual gives essentially the same definitions, yet other sources basically equate reduce and fold; I understood that reduce could rely on the operation being associative.

That seems like a reasonable requirement for reduce but not for fold.

-- 
John Cowan          http://www.ccil.org/~cowan        xxxxxx@ccil.org
I could dance with you till the cows come home.  On second thought,
I'd rather dance with the cows when you come home.
        --Rufus T. Firefly