Vincent's proposal wasn't "let's treat car as first", his proposal was "let's export it in racket/base". If we don't like first/rest, we should have a proposal to remove them from #lang racket... right? Otherwise, let's put them in racket/base. They're very simple names for very, very common operations. I use them all the time, and it makes me write different code in racket/base than in racket when I can't get them. I would like to either always have them, or be convinced of why I should never have them.<br>
<div class="gmail_extra"><br clear="all"><div>Carl Eastlund</div><br>
<br><br><div class="gmail_quote">On Thu, Dec 13, 2012 at 2:40 PM, Jay McCarthy <span dir="ltr"><<a href="mailto:jay.mccarthy@gmail.com" target="_blank">jay.mccarthy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I agree with Eli. first is not car and shouldn't be treated as it.<br>
<br>
car : (Cons a b) -> a<br>
first : (List a) -> a<br>
<br>
I also agree with Carl that we should deprecate grandpa's names and<br>
give nice names. I suggest "fst" and "snd" and "pair"<br>
<br>
Jay<br>
<div><div class="h5"><br>
On Thu, Dec 13, 2012 at 12:26 PM, Carl Eastlund <<a href="mailto:cce@ccs.neu.edu">cce@ccs.neu.edu</a>> wrote:<br>
> If they do the wrong thing, we should fix them, not deprecate them. We're<br>
> not LISP, let's not promote car/cdr as the primary names for list<br>
> operations.<br>
><br>
> Carl Eastlund<br>
><br>
><br>
><br>
> On Thu, Dec 13, 2012 at 2:19 PM, Eli Barzilay <<a href="mailto:eli@barzilay.org">eli@barzilay.org</a>> wrote:<br>
>><br>
>> -1, since they are different from what some people would expect them<br>
>> to do. -2 for the `empty', `cons?' etc aliases.<br>
>><br>
>><br>
>> An hour and a half ago, Vincent St-Amour wrote:<br>
>> > I just got tripped up, again, trying to traverse a list with `first'<br>
>> > and `rest' in a `racket/base' file. `first' and `rest' are only<br>
>> > available in `racket' and `racket/list', but not in `racket/base'.<br>
>> ><br>
>> > If we want to encourage use of `first' and `rest' over `car' and<br>
>> > `cdr' and of `racket/base' when possible (which, e.g., the style<br>
>> > guide does), I think it makes sense to provide `first' and `rest' in<br>
>> > `racket/base'.<br>
>> ><br>
>> > The attached patch implements that change.<br>
>> ><br>
>> > Does this sound reasonable?<br>
>><br>
>> --<br>
>> ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:<br>
>> <a href="http://barzilay.org/" target="_blank">http://barzilay.org/</a> Maze is Life!<br>
>> _________________________<br>
>> Racket Developers list:<br>
>> <a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/dev</a><br>
>><br>
><br>
><br>
> _________________________<br>
> Racket Developers list:<br>
> <a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/dev</a><br>
><br>
<br>
<br>
<br>
</div></div>--<br>
Jay McCarthy <<a href="mailto:jay@cs.byu.edu">jay@cs.byu.edu</a>><br>
Assistant Professor / Brigham Young University<br>
<a href="http://faculty.cs.byu.edu/%7Ejay" target="_blank">http://faculty.cs.byu.edu/~jay</a><br>
<br>
"The glory of God is Intelligence" - D&C 93<br>
<br>
</blockquote></div><br></div>