[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: If records are not sequences, why does aref work on records?
From: |
Drew Adams |
Subject: |
RE: If records are not sequences, why does aref work on records? |
Date: |
Fri, 7 Apr 2017 13:49:36 -0700 (PDT) |
> > If we decide to support aref or copy-sequence on records for
> > efficiency or backwards compatibility that doesn't mean we want them
> > to be full sequences.
>
> FWIW, I agree. I think we do need aref and copy-sequence to work on
> them, for backward compatibility reasons, but `sequencep` should
> return nil.
If such an approach is taken, with `copy-sequence' repurposed
instead of having a new function to do the job, then its
doc will need to be changed, to clarify that the arg and the
result are not necessarily sequences.
I don't know why we would want to pollute it that way.
Let `copy-sequence' be a sequence function.
I don't understand the backward-compatibility argument.
A record type has not existed before. When/where do we
already have `aref'/`copy-sequence' being applied to
something other than a sequence/array?
Oh, I see. Someone long ago let `aref' apply to byte code.
Too bad. But what about `copy-sequence' - what backward
compatibility is involved there?
And why does `aref' apply to byte code? Should byte code
perhaps be deemed an array (satisfy `arrayp')?
Or should we add a new function for byte code, to replace
the use of `aref' - and deprecate the latter? Seems like
`aref', just as for Common Lisp, should apply only to an
array.
- Re: Recent change in master breaks async package update using paradox, (continued)
- If records are not sequences, why does aref work on records?, Paul Eggert, 2017/04/07
- Re: If records are not sequences, why does aref work on records?, Lars Brinkhoff, 2017/04/07
- RE: If records are not sequences, why does aref work on records?, Drew Adams, 2017/04/07
- Re: If records are not sequences, why does aref work on records?, Lars Brinkhoff, 2017/04/07
- RE: If records are not sequences, why does aref work on records?, Drew Adams, 2017/04/07
- Re: If records are not sequences, why does aref work on records?, Noam Postavsky, 2017/04/07
- Re: If records are not sequences, why does aref work on records?, Stefan Monnier, 2017/04/07
- RE: If records are not sequences, why does aref work on records?,
Drew Adams <=
- Re: If records are not sequences, why does aref work on records?, Clément Pit-Claudel, 2017/04/07
- Re: If records are not sequences, why does aref work on records?, Noam Postavsky, 2017/04/07
- Re: If records are not sequences, why does aref work on records?, Paul Eggert, 2017/04/07
- Re: If records are not sequences, why does aref work on records?, Lars Brinkhoff, 2017/04/08
- Re: If records are not sequences, why does aref work on records?, Lars Brinkhoff, 2017/04/08
- Re: If records are not sequences, why does aref work on records?, Noam Postavsky, 2017/04/08
- Re: If records are not sequences, why does aref work on records?, Paul Eggert, 2017/04/08
- Re: If records are not sequences, why does aref work on records?, Eli Zaretskii, 2017/04/08
- Re: If records are not sequences, why does aref work on records?, Noam Postavsky, 2017/04/08
- Re: If records are not sequences, why does aref work on records?, Philipp Stephani, 2017/04/08