Right. An alternative would be to set decide eagerly, but `list?` tests are infrequent relative to pair constructions.
Then again, a function like `list` can and does set the "is a list" bit eagerly and cheaply on newly allocated pairs. At Wed, 28 Nov 2018 18:16:31 +0100, Robby Findler wrote: > Also "don't know yet". > > Robby > > On Wed, Nov 28, 2018 at 6:15 PM Alexis King <lexi.lam...@gmail.com> wrote: > > > > On Nov 28, 2018, at 07:15, Matthew Flatt <mfl...@cs.utah.edu> wrote: > > > > > > Yes, that's special handling for pairs in the sense that the > > > traditional Racket implementation takes advantage of leftover bits in a > > > pair object, and it uses two of them for "is a list" and "not a list". > > > > > > Racket-on-Chez doesn't have the extra bits to work with, so "is a list" > > > and "not a list" information is recorded separately in an `eq?`-based > > > hash table. > > > > Why does keeping track of “is a list” and “not a list” require two bits? > > It seems like a pair either is or is not a list, so one bit of information > > would be sufficient. Are there situations where the system can neither be > > sure that something is or is not a list? Circular lists, or something like > > that? > > > > (This is not really important, of course, I’m just curious.) > > > > Alexis > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Racket Users" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to racket-users+unsubscr...@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. > > > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.