From: Stephen Compall <s11@member.fsf.org>
Cc: guile-user@gnu.org, rm@fabula.de
Subject: Re: strange mkstemp! behavior
Date: 22 Sep 2004 10:46:12 -0500 [thread overview]
Message-ID: <xfywtym2tob.fsf@csserver.evansville.edu> (raw)
In-Reply-To: <87hdprazoo.fsf@zagadka.ping.de>
Marius Vollmer <mvo@zagadka.de> writes:
> It is very easy now to implement read-only strings in Guile. Should
> we do so? String literals and the the strings returned by
> symbol->string would be read-only. Anything else?
- procedure: vector-set! vector k obj
K must be a valid index of VECTOR. `Vector-set!' stores OBJ in
element K of VECTOR. The value returned by `vector-set!' is
unspecified.
(let ((vec (vector 0 '(2 2 2 2) "Anna")))
(vector-set! vec 1 '("Sue" "Sue"))
vec)
==> #(0 ("Sue" "Sue") "Anna")
(vector-set! '#(0 1 2) 1 "doe")
==> _error_ ; constant vector
- procedure: set-car! pair obj
Stores OBJ in the car field of PAIR. The value returned by
`set-car!' is unspecified.
(define (f) (list 'not-a-constant-list))
(define (g) '(constant-list))
(set-car! (f) 3) ==> _unspecified_
(set-car! (g) 3) ==> _error_
It's also an error to modify numbers and booleans, but I don't think
this is a problem.
The way it is now doesn't bother me at all. One fewer detail is
usually good IMHO, barring other considerations.
--
Stephen Compall or s11 or sirian
Patch griefs with proverbs.
-- William Shakespeare, "Much Ado About Nothing"
LLNL Dateline Consul NSA LABLINK Forte JPL plutonium lock picking
Ft. Bragg Area 51 S Key Qaddafi Leitrim defense information warfare
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
next prev parent reply other threads:[~2004-09-22 15:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-13 8:24 strange mkstemp! behavior Maarten Grachten
2004-09-13 8:51 ` rm
2004-09-13 9:21 ` Maarten Grachten
2004-09-13 14:15 ` Stephen Compall
2004-09-22 0:56 ` Marius Vollmer
2004-09-22 15:46 ` Stephen Compall [this message]
2004-09-22 20:28 ` Marius Vollmer
2004-09-22 16:11 ` Paul Jarc
2004-09-25 22:14 ` Kevin Ryde
2004-09-28 21:17 ` Marius Vollmer
2004-09-29 16:09 ` Marius Vollmer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xfywtym2tob.fsf@csserver.evansville.edu \
--to=s11@member.fsf.org \
--cc=guile-user@gnu.org \
--cc=rm@fabula.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).