From: Kyle M on 8 Jan 2010 08:04 On Jan 8, 6:44 am, Christophe Rhodes <cs...(a)cantab.net> wrote: > Ron Garret <rNOSPA...(a)flownet.com> writes: > > In article <87wrzt3akf....(a)cantab.net>, > > Christophe Rhodes <cs...(a)cantab.net> wrote: > <snip> > > Really? How do you make a sequence that isn't either a list or a vector? > > By calling an appropriate constructor, either user-defined or provided > by your implementation. For one approach, see the work I presented at > ILC'07: "User-extensible sequences in Common Lisp". But the point is > that the CL standard explicitly says that LIST and VECTOR do not > necessarily form an exhaustive partition of SEQUENCE. > > Christophe Where does it say this? I'm looking at the beginning of Chapter 14 CLTL2 and I don't see it stated explicitly. "The type sequence encompasses both lists and vectors (one-dimensional arrays)." -CLTL2 This doesn't imply that list + vector is exhaustive, but it doesn't "explicitly" imply that it isn't. And if you read the whole section (maybe I inserted my own bias), it feels like the writers were only using sequence as a way of discussing functions common to both subtypes of sequence. "A sequence is an ordered collection of elements, implemented as either a vector or a list." -HyperSpec There isn't anything wrong with what Ron said about sequences. In practice, there are no sequences that are not lists or vectors. Kyle
From: Zach Beane on 8 Jan 2010 08:33 Kyle M <kylemcg(a)gmail.com> writes: > Where does it say [that LIST and VECTOR do not necessarily form an > exhaustive partition of SEQUENCE]? http://l1sp.org/cl/sequence has this: The types vector and the type list are disjoint subtypes of type sequence, but are not necessarily an exhaustive partition of sequence. Zach
From: Leandro Rios on 8 Jan 2010 08:33 Kyle M <kylemcg(a)gmail.com> writes: > On Jan 8, 6:44�am, Christophe Rhodes <cs...(a)cantab.net> wrote: >> Ron Garret <rNOSPA...(a)flownet.com> writes: >> > In article <87wrzt3akf....(a)cantab.net>, >> > �Christophe Rhodes <cs...(a)cantab.net> wrote: >> > > <snip> > >> > Really? �How do you make a sequence that isn't either a list or a vector? >> >> By calling an appropriate constructor, either user-defined or provided >> by your implementation. �For one approach, see the work I presented at >> ILC'07: "User-extensible sequences in Common Lisp". �But the point is >> that the CL standard explicitly says that LIST and VECTOR do not >> necessarily form an exhaustive partition of SEQUENCE. >> >> Christophe > > Where does it say this? I'm looking at the beginning of Chapter 14 > CLTL2 and I don't see it stated explicitly. > > "The type sequence encompasses both lists and vectors (one-dimensional > arrays)." -CLTL2 > > This doesn't imply that list + vector is exhaustive, but it doesn't > "explicitly" imply that it isn't. And if you read the whole section > (maybe I inserted my own bias), it feels like the writers were only > using sequence as a way of discussing functions common to both > subtypes of sequence. > > "A sequence is an ordered collection of elements, implemented as > either a vector or a list." -HyperSpec > > There isn't anything wrong with what Ron said about sequences. In > practice, there are no sequences that are not lists or vectors. > > Kyle See: http://www.lispworks.com/documentation/HyperSpec/Body/t_seq.htm#sequence Leandro
From: Kyle M on 8 Jan 2010 08:54 On Jan 8, 8:33 am, Zach Beane <x...(a)xach.com> wrote: > Kyle M <kyle...(a)gmail.com> writes: > > Where does it say [that LIST and VECTOR do not necessarily form an > > exhaustive partition of SEQUENCE]? > > http://l1sp.org/cl/sequencehas this: > > The types vector and the type list are disjoint subtypes of type > sequence, but are not necessarily an exhaustive partition of > sequence. > > Zach OK, I stand corrected. Kyle
From: Pascal Costanza on 8 Jan 2010 10:47
On 08/01/2010 09:46, Ron Garret wrote: > Even the practical camp has a somewhat schizophrenic attitude towards > macros. On the one hand, macros are often touted as the cool feature > that makes Lisp superior to other languages. On the other hand, > reactions to specific macros are often strongly negative. "Leave macro > writing to the experts" is an often-heard refrain, and even macros > written by experts are more often than not very badly received (e.g. > John Foderaro's IF* macro, or more recently, Pascal Costanza's filtered > functions). The LOOP macro has a dedicated band of detractors who > regularly urge people not to use it because it isn't "Lispy" enough > (whatever that could possibly mean). The *idea* of macros seems to be > much more enthusiastically embraced than actual macros. I don't think that's correct. In the case of filtered functions, the reactions were mostly positive (to my surprise, I didn't expect that much positive feedback). Only one person was especially aggressive in voicing his negative opinion about them. If I understand correctly, that was the same with IF*. You can easily get wrong impressions when listening only to the loudest voices. LOOP has a lot of detractors, but also a lot of fans. If that is in any way representative, at the first European Lisp Workshop (in Oslo in 2004), there were 40 participants, and the overwhelming majority stated to use LOOP for iterative tasks (to everybody's surprise). Pascal -- My website: http://p-cos.net Common Lisp Document Repository: http://cdr.eurolisp.org Closer to MOP & ContextL: http://common-lisp.net/project/closer/ |