unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Roland Orre <orre@nada.kth.se>
Cc: guile-user@gnu.org
Subject: Re: null terminated strings
Date: Fri, 16 Jan 2004 12:02:09 +0100	[thread overview]
Message-ID: <1074250929.6734.63.camel@localhost> (raw)
In-Reply-To: <87u12wjiy7.fsf@ID-28718.user.uni-berlin.de>

On Fri, 2004-01-16 at 11:17, Andreas Voegele wrote:
> Roland Orre writes:
> 
> > On Fri, 2004-01-16 at 10:10, Andreas Voegele wrote:
> >
> >> "Remove calls to SCM_STRING_COERCE_0TERMINATION_X.  Since the
> >> substring type is gone, all strings are 0-terminated anyway."
> >
> > Such a statement is very worrying. What happened to the promises
> > that all substrings will be shared strings?
> 
> I'm new to Guile.  I don't know why shared strings were removed from
> Guile, but things were probably simplified greatly by this decision.
> I think that it is very useful to zero terminate all strings since
> embedding and extending Guile becomes easier.

During all years I've used scm and later guile (I think 14 years now)
I have very very rarely had any need for null terminated strings. There
is a function in guile to convert a null terminated string to a guile
string, this I've used a few times. In C programming I often don't
rely on null terminated strings either as there are many C library
functions that works with length, which I consider more elegant. The
absence of shared substrings on the other hand means a lot of special
code to be able to do something similar without having to copy and
create strings all the time. For instance in a conversion routine for
fixed data base tables I made some years ago I had first used
substrings. The program took 15 hours to run on a specific table. When
I changed to use shared substrings it took about 1 hour on the same
table. 

I think it is quite bad to have the requirement that guile should rely
on null terminated strings as it is often quite easy to come around 
this from my point of view. In guile 1.6.4 it is also expressed so that
all substrings are intended to become internally shared, which I don't
see have happened yet.

> It seems that you'll have to stick to Thien-Thi Nguyen's Guile
> version, available at http://www.glug.org/, if you need shared
> strings.

OK, I haven't haven't followed his development very carefully, but
maybe I should take a closer look. I don't know if he has catched
up with the functionality with goops and such, which I need for
matrix calculations.

	Best regards
	Roland Orre




_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


  reply	other threads:[~2004-01-16 11:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-05 17:40 argz SMOB Brian S McQueen
2004-01-06 19:54 ` Daniel Skarda
2004-01-08 16:44   ` Brian S McQueen
2004-01-09 14:08     ` Daniel Skarda
2004-01-12 16:08       ` Brian S McQueen
2004-01-15 18:43   ` Brian S McQueen
2004-01-16  0:21     ` Paul Jarc
2004-01-16  9:10       ` null terminated strings (was: argz SMOB) Andreas Voegele
     [not found]         ` <1074245327.6733.9.camel@localhost>
2004-01-16 10:17           ` null terminated strings Andreas Voegele
2004-01-16 11:02             ` Roland Orre [this message]
2004-01-16 12:24               ` Andreas Voegele
2004-01-16 18:20                 ` Brian S McQueen
2004-01-16 20:36                   ` Paul Jarc
2004-01-16 21:06                     ` Tom Lord
2004-01-16 21:02                       ` Paul Jarc
2004-01-16 21:27                         ` Roland Orre
2004-01-19 17:28                       ` Ken Anderson
2004-01-19 18:46                         ` Per Bothner
2004-01-19 19:16                           ` Ken Anderson

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=1074250929.6734.63.camel@localhost \
    --to=orre@nada.kth.se \
    --cc=guile-user@gnu.org \
    /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).