Re: Do people dislike parentheses or the conceptual mismatch with trees?



On 2007-10-17 04:04:35 -0400, Ville Oikarinen <ville@xxxxxxxxxxxxx> said:

anonymous:

(green yellow)

named:

favorite-colors {green yellow}

named:

(defparameter *favorite-colors* (list 'green 'yellow))

named:

(let ((favorite-colors (list 'green 'yellow))
(favorite-days (list 'saturday 'sunday))
...

named:

? (defparameter *favorites-list*
(list '(favorite-colors . (green yellow))
'(favorite-things . (whiskers-on-kittens warm-woolen-mittens))))
*FAVORITES-LIST*
? (first (cdr (assoc 'favorite-things *favorites-list*)))
WHISKERS-ON-KITTENS
? (second (cdr (assoc 'favorite-things *favorites-list*)))
WARM-WOOLEN-MITTENS
?

or:

? (loop with favorite-colors = (list 'green 'yellow)
with favorite-things =
(list 'whiskers-on-kittens 'warm-woolen-mittens)
with all-favorites = (append favorite-colors favorite-things)
for element in all-favorites do
(format t "~a is one of my favorites.~%" element))
GREEN is one of my favorites.
YELLOW is one of my favorites.
WHISKERS-ON-KITTENS is one of my favorites.
WARM-WOOLEN-MITTENS is one of my favorites.
NIL
?

or:

(favorite-colors (green yellow) favorite-things (whiskers-on-kittens ...


where *your* program interprets this list structure as named lists.

You seem to keep missing the point that there is no "objective" interpretation of list data in lisp. Your program is free to interpret it any way you like. Saying that lisp lists are "anonymous" just means that *you* have been interpreting them anonymously. If this is a problem for you then just stop doing it.

Lisp programmers interpret lists as named lists all the time (look at the association lists above, though I hesitate to suggest this lest you think it's the only way to do it - it's not). You can interpret lists as named lists in any number of ways.

Please also read Kent's reply down thread. I think he comes at it from a different angle but to the same end - i.e., that you think that your problems with your preferred uses for trees/lisp are why *others* don't like lisp.

.



Relevant Pages

  • Re: Favorites folder
    ... :I did a web search with this search term: maintain Favorites in ... IE lists Favorites in the order that you add them. ... To sort Favorites in alphabetical order, open the Favorites menu, ...
    (microsoft.public.windowsxp.customize)
  • Re: [opensuse] Mozilla Firefox Save Dialog Bug? Disappearing Favorites
    ... Carlos E. R. wrote: ... added favorites to the save dialog. ... that lists a group of directories that you have defined ... I mean the left hand panel titled "Places". ...
    (SuSE)
  • Re: Whats wrong with Willis?
    ... It lists the Mets as favorites to not only get Haren and Blanton, ...
    (alt.sports.baseball.ny-mets)
  • Re: How to Sort all Favorites Categories
    ... The only folder of Favorites I traditionally keep unsorted is the Links so ... Removing it does not cause the lists to be sorted all the time. ... > It is a on-off fix to start from a complete alpha order, ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Im sorry, but
    ... One of my favorite pastimes is to interpret what people say literally. ... I've always liked language, and I guess I had a few people in my family ... My favorites these past couple of days have been: ... "Sexual harassment training" - I've been to several of these, ...
    (alt.usage.english)