SRFI 185: Linear adjustable-size strings Arthur A. Gleckler (24 Feb 2020 18:18 UTC)
(missing)
(missing)
Re: SRFI 185: Linear adjustable-size strings Per Bothner (07 Mar 2020 23:56 UTC)
Re: SRFI 185: Linear adjustable-size strings John Cowan (07 Mar 2020 23:56 UTC)
Re: SRFI 185: Linear adjustable-size strings Arthur A. Gleckler (24 Feb 2020 19:14 UTC)

Re: SRFI 185: Linear adjustable-size strings Per Bothner 24 Feb 2020 19:31 UTC

On 2/24/20 11:06 AM, Marc Nieper-Wißkirchen wrote:

> You want to be able to apply the linear-update procedures on temporary values. In a call to `string-linear-append!' the `string' argument does not have to be a variable reference.

I understand the conceptual elegance of linear-update procedures, but the trade-off is they're slightly
inconvenient and hard to use safely.  Which may be why no-one except the Scheme community
(as far as I know) uses them.  Compiler warnings can help, but how many Scheme compilers have
(or could easily add) "unused function result" warnings?

On 2/24/20 11:20 AM, John Cowan wrote:
> Your name is on it because you wrote most of it, but I will add a no-endorsement section.

Thanks.  I have mixed feelings about this.

> This is just the ability to declare optional static types.  If a procedure is declared as returning an unspecified value, then you get a type warning if you try to use the value.  Per contra, if it is declared to return a value, then you get a type warning if you do not use the value.

What about procedures that have both side-effects and return a result?  Would not that
return too many warnings, unless the "must check/use return value" property is
orthogonal from the "return type" property?
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/