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.
Carl Eastlund On Thu, Dec 13, 2012 at 2:40 PM, Jay McCarthy <jay.mccar...@gmail.com>wrote: > I agree with Eli. first is not car and shouldn't be treated as it. > > car : (Cons a b) -> a > first : (List a) -> a > > I also agree with Carl that we should deprecate grandpa's names and > give nice names. I suggest "fst" and "snd" and "pair" > > Jay > > On Thu, Dec 13, 2012 at 12:26 PM, Carl Eastlund <c...@ccs.neu.edu> wrote: > > If they do the wrong thing, we should fix them, not deprecate them. > We're > > not LISP, let's not promote car/cdr as the primary names for list > > operations. > > > > Carl Eastlund > > > > > > > > On Thu, Dec 13, 2012 at 2:19 PM, Eli Barzilay <e...@barzilay.org> wrote: > >> > >> -1, since they are different from what some people would expect them > >> to do. -2 for the `empty', `cons?' etc aliases. > >> > >> > >> An hour and a half ago, Vincent St-Amour wrote: > >> > I just got tripped up, again, trying to traverse a list with `first' > >> > and `rest' in a `racket/base' file. `first' and `rest' are only > >> > available in `racket' and `racket/list', but not in `racket/base'. > >> > > >> > If we want to encourage use of `first' and `rest' over `car' and > >> > `cdr' and of `racket/base' when possible (which, e.g., the style > >> > guide does), I think it makes sense to provide `first' and `rest' in > >> > `racket/base'. > >> > > >> > The attached patch implements that change. > >> > > >> > Does this sound reasonable? > >> > >> -- > >> ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: > >> http://barzilay.org/ Maze is > Life! > >> _________________________ > >> Racket Developers list: > >> http://lists.racket-lang.org/dev > >> > > > > > > _________________________ > > Racket Developers list: > > http://lists.racket-lang.org/dev > > > > > > -- > Jay McCarthy <j...@cs.byu.edu> > Assistant Professor / Brigham Young University > http://faculty.cs.byu.edu/~jay > > "The glory of God is Intelligence" - D&C 93 > >
_________________________ Racket Developers list: http://lists.racket-lang.org/dev