I would agree with Matthias - there is no natural fill value. A vector is often used as a sequence of numbers - at least that is where I use them the most. And, zero is a good default. A list is not usually a sequence of numbers - it's typically a sequence of whatever. And, there is no value that would be useful 'most of the time'. <br>
<br>That being said, if you wanted them to be consistent, I would vote for #f. But, that is because I'm a long-time Lisper and it looks like nil to me. And, I'm not a 'voting' member of the list anyway. :)<br>
<br>I would like to know why #<undefined> isn't utilized more - or, alternatively, why it exists in the first place. Is there a real difference between no value (my mental model for #<void>) and an undefined/uninitialized value (my mental model for #<undefined>)? In the case of lists or vectors returned by make-list or make-vector (with no second argument), I think of those elements as being undefined or uninitialized and would like an error raised if I reference them before I store something in them.<br>
<br>Since make-list returns an immutable list, it's hard to think of its elements as being undefined - I can't mutate them anyway. The above argument would make more sense for a make-mlist, which I don't think is there at the moment.<br>
<br>Doug<br><br><div class="gmail_quote">On Fri, May 22, 2009 at 6:25 AM, Matthias Felleisen <span dir="ltr"><<a href="mailto:matthias@ccs.neu.edu">matthias@ccs.neu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
make-list always takes two arguments. There is no natural fill value.<div><div></div><div class="h5"><br>
<br>
<br>
<br>
On May 22, 2009, at 4:14 AM, Eli Barzilay wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On May 22, Chongkai Zhu wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
procedure make-list: expects 2 arguments, given 1: 0<br>
</blockquote>
<br>
OK, quick poll time:<br>
<br>
1. What should the default value be (#f as it was, #<void> because it<br>
makes more sense, or 0 because that's what `make-vector' uses)?<br>
<br>
2. Which one should be fixed -- only the srfi/1 version, or the<br>
scheme/list version (implying srfi/1 too)?<br>
<br>
-- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:<br>
<a href="http://www.barzilay.org/" target="_blank">http://www.barzilay.org/</a> Maze is Life!<br>
_________________________________________________<br>
For list-related administrative tasks:<br>
<a href="http://list.cs.brown.edu/mailman/listinfo/plt-dev" target="_blank">http://list.cs.brown.edu/mailman/listinfo/plt-dev</a><br>
</blockquote>
<br>
_________________________________________________<br>
For list-related administrative tasks:<br>
<a href="http://list.cs.brown.edu/mailman/listinfo/plt-dev" target="_blank">http://list.cs.brown.edu/mailman/listinfo/plt-dev</a><br>
</div></div></blockquote></div><br>