unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* doco srfi-13 string-replace
@ 2003-05-23 21:33 Kevin Ryde
  2003-05-23 21:38 ` Kevin Ryde
  0 siblings, 1 reply; 8+ messages in thread
From: Kevin Ryde @ 2003-05-23 21:33 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 248 bytes --]

FYI:
        * srfi-modules.texi (SRFI-13 Miscellaneous): In string-replace, start1
        and end1 are not optional.

I'll apply this change to the 1.6 branch too, since it's contrary to
the spec and the code, though it's not really a big deal.


[-- Attachment #2: srfi-modules.texi.string-replace.diff --]
[-- Type: text/plain, Size: 582 bytes --]

--- srfi-modules.texi.~1.14.~	2003-05-22 11:33:27.000000000 +1000
+++ srfi-modules.texi	2003-05-23 18:07:50.000000000 +1000
@@ -1799,7 +1799,7 @@
 another string and @code{string-tokenize} splits a string into a list of
 strings, breaking it up at a specified character.
 
-@deffn {Scheme Procedure} string-replace s1 s2 [start1 end1 start2 end2]
+@deffn {Scheme Procedure} string-replace s1 s2 start1 end1 [start2 end2]
 Return the string @var{s1}, but with the characters
 @var{start1} @dots{} @var{end1} replaced by the characters
 @var{start2} @dots{} @var{end2} from @var{s2}.

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: doco srfi-13 string-replace
  2003-05-23 21:33 doco srfi-13 string-replace Kevin Ryde
@ 2003-05-23 21:38 ` Kevin Ryde
  2003-06-01 23:08   ` Marius Vollmer
  0 siblings, 1 reply; 8+ messages in thread
From: Kevin Ryde @ 2003-05-23 21:38 UTC (permalink / raw)


I wrote:
>        * srfi-modules.texi (SRFI-13 Miscellaneous): In string-replace, start1
>        and end1 are not optional.

Oops, no, I was looking at the wrong stuff.  I see the srfi-13 spec
has them as mandatory but the guile code makes them optional.  Should
that be mentioned at all?


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: doco srfi-13 string-replace
  2003-05-23 21:38 ` Kevin Ryde
@ 2003-06-01 23:08   ` Marius Vollmer
  2003-06-02  8:23     ` Martin Grabmueller
  0 siblings, 1 reply; 8+ messages in thread
From: Marius Vollmer @ 2003-06-01 23:08 UTC (permalink / raw)
  Cc: guile-devel

Kevin Ryde <user42@zip.com.au> writes:

> I wrote:
> >        * srfi-modules.texi (SRFI-13 Miscellaneous): In
> >        string-replace, start1 and end1 are not optional.
> 
> Oops, no, I was looking at the wrong stuff.  I see the srfi-13 spec
> has them as mandatory but the guile code makes them optional.  Should
> that be mentioned at all?

Hmmm.  There is not much value in extending an SRFI, I'd say.  People
can't really use our extensions if they want to stay portable.
However, since we have that code, we should document it.  So, please
document that behavior but clearly mark it as a "Guile extension".

Ok?

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: doco srfi-13 string-replace
  2003-06-01 23:08   ` Marius Vollmer
@ 2003-06-02  8:23     ` Martin Grabmueller
  2003-06-02 15:58       ` Marius Vollmer
  0 siblings, 1 reply; 8+ messages in thread
From: Martin Grabmueller @ 2003-06-02  8:23 UTC (permalink / raw)
  Cc: guile-devel

On Mon, Jun 02, 2003 at 01:08:20AM +0200, Marius Vollmer wrote:

> Hmmm.  There is not much value in extending an SRFI, I'd say.  People
> can't really use our extensions if they want to stay portable.
> However, since we have that code, we should document it.  So, please
> document that behavior but clearly mark it as a "Guile extension".

Just for information: when I wrote the code for this SRFI, I only had
the draft version of the SRFI document, so there may be some more errors
in the code due to this fact.  It would be best to adjust the code to
match the final SRFI, instead of introducing extensions.

'martin


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: doco srfi-13 string-replace
  2003-06-02  8:23     ` Martin Grabmueller
@ 2003-06-02 15:58       ` Marius Vollmer
  2003-06-03  6:56         ` Martin Grabmueller
  2003-06-04 15:45         ` Kevin Ryde
  0 siblings, 2 replies; 8+ messages in thread
From: Marius Vollmer @ 2003-06-02 15:58 UTC (permalink / raw)
  Cc: guile-devel

Martin Grabmueller <magr@cs.tu-berlin.de> writes:

> It would be best to adjust the code to match the final SRFI, instead
> of introducing extensions.

Hmm, how long has our code being out there already?  When it has been
shipped with Guile 1.6, we need to be very conservative about changing
things that are not outright bugs.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: doco srfi-13 string-replace
  2003-06-02 15:58       ` Marius Vollmer
@ 2003-06-03  6:56         ` Martin Grabmueller
  2003-06-03 13:01           ` Marius Vollmer
  2003-06-04 15:45         ` Kevin Ryde
  1 sibling, 1 reply; 8+ messages in thread
From: Martin Grabmueller @ 2003-06-03  6:56 UTC (permalink / raw)


On Mon, Jun 02, 2003 at 05:58:39PM +0200, Marius Vollmer wrote:
> Martin Grabmueller <magr@cs.tu-berlin.de> writes:
> 
> > It would be best to adjust the code to match the final SRFI, instead
> > of introducing extensions.
> 
> Hmm, how long has our code being out there already?  When it has been
> shipped with Guile 1.6, we need to be very conservative about changing
> things that are not outright bugs.

Well, you can call non-accordance to a standard a bug.  But maybe you're
right and we should just document the extension (which does not seem
useful to me, by the way).  Guile 1.6.3 has the extension, at least.

'martin


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: doco srfi-13 string-replace
  2003-06-03  6:56         ` Martin Grabmueller
@ 2003-06-03 13:01           ` Marius Vollmer
  0 siblings, 0 replies; 8+ messages in thread
From: Marius Vollmer @ 2003-06-03 13:01 UTC (permalink / raw)
  Cc: guile-devel

Martin Grabmueller <magr@cs.tu-berlin.de> writes:

> On Mon, Jun 02, 2003 at 05:58:39PM +0200, Marius Vollmer wrote:
> > Martin Grabmueller <magr@cs.tu-berlin.de> writes:
> > 
> > > It would be best to adjust the code to match the final SRFI, instead
> > > of introducing extensions.
> > 
> > Hmm, how long has our code being out there already?  When it has been
> > shipped with Guile 1.6, we need to be very conservative about changing
> > things that are not outright bugs.
> 
> Well, you can call non-accordance to a standard a bug.

But an extension does not necessarily violate the standard.  All code
written against the standard will work, in this case.

> But maybe you're right and we should just document the extension
> (which does not seem useful to me, by the way).  Guile 1.6.3 has the
> extension, at least.

Yes, it's not a very important extension but we have it and removing
it should not be done light-hearted.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: doco srfi-13 string-replace
  2003-06-02 15:58       ` Marius Vollmer
  2003-06-03  6:56         ` Martin Grabmueller
@ 2003-06-04 15:45         ` Kevin Ryde
  1 sibling, 0 replies; 8+ messages in thread
From: Kevin Ryde @ 2003-06-04 15:45 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 267 bytes --]

Marius Vollmer <mvo@zagadka.de> writes:
>
> So, please
> document that behavior but clearly mark it as a "Guile extension".

I made this addition,

	* srfi-modules.texi (SRFI-13 Miscellaneous): In string-replace, note
	start1 and end1 optional is a Guile extension.


[-- Attachment #2: srfi-modules.texi.string-replace-optional.diff --]
[-- Type: text/plain, Size: 509 bytes --]

--- srfi-modules.texi.~1.16.~	2003-05-24 09:42:30.000000000 +1000
+++ srfi-modules.texi	2003-06-05 01:45:02.000000000 +1000
@@ -1803,6 +1803,9 @@
 Return the string @var{s1}, but with the characters
 @var{start1} @dots{} @var{end1} replaced by the characters
 @var{start2} @dots{} @var{end2} from @var{s2}.
+
+For reference, note that SRFI-13 specifies @var{start1} and @var{end1}
+as mandatory, but in Guile they are optional.
 @end deffn
 
 @deffn {Scheme Procedure} string-tokenize s [token-set start end]

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-06-04 15:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-23 21:33 doco srfi-13 string-replace Kevin Ryde
2003-05-23 21:38 ` Kevin Ryde
2003-06-01 23:08   ` Marius Vollmer
2003-06-02  8:23     ` Martin Grabmueller
2003-06-02 15:58       ` Marius Vollmer
2003-06-03  6:56         ` Martin Grabmueller
2003-06-03 13:01           ` Marius Vollmer
2003-06-04 15:45         ` Kevin Ryde

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).