caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Malcolm Matalka <mmatalka@gmail.com>
To: Anthony Tavener <anthony.tavener@gmail.com>
Cc: Gerd Stolpmann <info@gerd-stolpmann.de>,  caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Immutable strings
Date: Fri, 04 Jul 2014 20:38:58 +0000	[thread overview]
Message-ID: <87d2dkn9jx.fsf@gmail.com> (raw)
In-Reply-To: <CAN=ouMTLg9Hcq_Q+3EcU9fkgpeS9QLhwQ_1-84WqT4S6HnB28A@mail.gmail.com> (Anthony Tavener's message of "Fri, 4 Jul 2014 14:31:30 -0600")

I haven't really been following this but I'm curious why a new type,
rstring, was not introduced?

But, as for the actual impact on the community.  This seems like a
question the OPAM team can answer now, right?  They can compile every
package with immutable strings turned on and see how many fail?  That
would give an idea of the impact and possibly suggest a migration path
or an alternative approach.

/M

Anthony Tavener <anthony.tavener@gmail.com> writes:

> I'm rather welcoming of the immutable change (hehe) of strings, but I
> haven't
> considered these details -- perhaps because I only use strings as immutable
> (currently with no such guarantee!), and use bigarray for a block of mutable
> bytes... which is your idea #3.
>
> It seems the "bytes" type would be most useful in cases where mutable and
> immutable strings are used in a mixed manner... but given these practical
> issues you raise, it could be less pleasant than it first appears. Your
> "stringlike" solution seems reasonable, but I don't have a good use-case in
> mind for mixed mutable/immutable to help me imagine the result. What are
> some
> scenarios where this mix of types is desired? I think even Rust doesn't
> support mutable strings -- which seems bold for its target audience, yet
> they're fine with it?
>
> When I consider possible scenarios of utf8 encoded strings, and mutating
> that
> in-place... ugh. Even "back in the day", doing string operations in C on
> ASCII, I'd favor building a new string rather than flirting with saving ops
> by
> overwriting values in the current string. Oh! Upper/lower-case! Maybe that's
> the one good use-case. ;)
>
>
>
> On Fri, Jul 4, 2014 at 1:18 PM, Gerd Stolpmann <info@gerd-stolpmann.de>
> wrote:
>
>> Hi list,
>>
>> I've just posted a blog article where I criticize the new concept of
>> immutable strings that will be available in OCaml 4.02 (as option):
>>
>> http://blog.camlcity.org/blog/bytes1.html
>>
>> In short my point is that it the new concept is not far reaching enough,
>> and will even have negative impact on the code quality when it is not
>> improved. I also present three ideas how to improve it.
>>
>> Gerd
>> --
>> ------------------------------------------------------------
>> Gerd Stolpmann, Darmstadt, Germany    gerd@gerd-stolpmann.de
>> My OCaml site:          http://www.camlcity.org
>> Contact details:        http://www.camlcity.org/contact.html
>> Company homepage:       http://www.gerd-stolpmann.de
>> ------------------------------------------------------------
>>
>>
>>
>> --
>> Caml-list mailing list.  Subscription management and archives:
>> https://sympa.inria.fr/sympa/arc/caml-list
>> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
>> Bug reports: http://caml.inria.fr/bin/caml-bugs
>>

  reply	other threads:[~2014-07-04 20:39 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-04 19:18 Gerd Stolpmann
2014-07-04 20:31 ` Anthony Tavener
2014-07-04 20:38   ` Malcolm Matalka [this message]
2014-07-04 23:44   ` Daniel Bünzli
2014-07-05 11:04   ` Gerd Stolpmann
2014-07-16 11:38     ` Damien Doligez
2014-07-04 21:01 ` Markus Mottl
2014-07-05 11:24   ` Gerd Stolpmann
2014-07-08 13:23     ` Jacques Garrigue
2014-07-08 13:37       ` Alain Frisch
2014-07-08 14:04         ` Jacques Garrigue
2014-07-28 11:14   ` Goswin von Brederlow
2014-07-28 15:51     ` Markus Mottl
2014-07-29  2:54       ` Yaron Minsky
2014-07-29  9:46         ` Goswin von Brederlow
2014-07-29 11:48         ` John F. Carr
2014-07-07 12:42 ` Alain Frisch
2014-07-08 12:24   ` Gerd Stolpmann
2014-07-09 13:54     ` Alain Frisch
2014-07-09 18:04       ` Gerd Stolpmann
2014-07-10  6:41         ` Nicolas Boulay
2014-07-14 17:40       ` Richard W.M. Jones
2014-07-08 18:15 ` mattiasw
2014-07-08 19:24   ` Daniel Bünzli
2014-07-08 19:27     ` Raoul Duke
2014-07-09 14:15   ` Daniel Bünzli
2014-07-14 17:45   ` Richard W.M. Jones
2014-07-21 15:06 ` Alain Frisch
     [not found]   ` <20140722.235104.405798419265248505.Christophe.Troestler@umons.ac.be>
2014-08-29 16:30     ` Damien Doligez

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d2dkn9jx.fsf@gmail.com \
    --to=mmatalka@gmail.com \
    --cc=anthony.tavener@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=info@gerd-stolpmann.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 NNTP newsgroup(s).