[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: why are there [v e c t o r s] in Lisp?
From: |
Emanuel Berg |
Subject: |
Re: why are there [v e c t o r s] in Lisp? |
Date: |
Sat, 17 Oct 2015 01:30:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Random832 <random832@fastmail.com> writes:
> The thing is, if you can car a string people will
> wonder why you can't cdr it. And with mutable
> objects it's hard to make cdr work right. (fsvo
> "right")
You can't `car' a string or do anything with it that
requires it to be a list, because it isn't. If you try
to car it, the string will fail the `listp' test.
But because it is natural to think of strings as lists
of chars, perhaps from the C days of, say
char *str = malloc(strlen(argv[argc - 1]));
or actually because it is normal for humans to think
of strings that way, it should be pointed out - and
now that has happened - that the "string" syntax isn't
a shorthand for creating lists of chars.
--
underground experts united
http://user.it.uu.se/~embe8573
Re: why are there [v e c t o r s] in Lisp?, Pascal J. Bourguignon, 2015/10/15
- Re: why are there [v e c t o r s] in Lisp?, Emanuel Berg, 2015/10/15
- Re: why are there [v e c t o r s] in Lisp?, Random832, 2015/10/15
- Re: why are there [v e c t o r s] in Lisp?, Emanuel Berg, 2015/10/15
- Re: why are there [v e c t o r s] in Lisp?, Random832, 2015/10/15
- Re: why are there [v e c t o r s] in Lisp?,
Emanuel Berg <=
- Message not available
- Re: why are there [v e c t o r s] in Lisp?, Pascal J. Bourguignon, 2015/10/16
- Re: why are there [v e c t o r s] in Lisp?, Emanuel Berg, 2015/10/17
- Message not available
- Re: why are there [v e c t o r s] in Lisp?, Pascal J. Bourguignon, 2015/10/17
- Re: why are there [v e c t o r s] in Lisp?, Emanuel Berg, 2015/10/17
- Message not available
- Re: why are there [v e c t o r s] in Lisp?, Pascal J. Bourguignon, 2015/10/17
Message not availableRe: why are there [v e c t o r s] in Lisp?, Pascal J. Bourguignon, 2015/10/16
Re: why are there [v e c t o r s] in Lisp?, Random832, 2015/10/16
Message not availableRe: why are there [v e c t o r s] in Lisp?, Pascal J. Bourguignon, 2015/10/16
Message not available