From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id B5DE27F9D5 for ; Fri, 4 Jul 2014 23:01:20 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of markus.mottl@gmail.com) identity=pra; client-ip=209.85.192.42; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="markus.mottl@gmail.com"; x-sender="markus.mottl@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of markus.mottl@gmail.com designates 209.85.192.42 as permitted sender) identity=mailfrom; client-ip=209.85.192.42; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="markus.mottl@gmail.com"; x-sender="markus.mottl@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-qg0-f42.google.com) identity=helo; client-ip=209.85.192.42; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="markus.mottl@gmail.com"; x-sender="postmaster@mail-qg0-f42.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiEBAGIVt1PRVcAqlGdsb2JhbABag2Bagm+rTJdwAYEDCBYPAQEBAQcLCwkSKoQDAQEBBBIRHQEUBxILAQMMBgULAwoCAgkdAgIhAQERAQUBChIGEwkJCQeICwEDEQ2jMmqLJ4FygxCOZgoZJwMKZIVuEQEFDoEei04Kgh4HgneBTAWEaQWUCAOBfYFIjDCEIxgphQ8hLw X-IPAS-Result: AiEBAGIVt1PRVcAqlGdsb2JhbABag2Bagm+rTJdwAYEDCBYPAQEBAQcLCwkSKoQDAQEBBBIRHQEUBxILAQMMBgULAwoCAgkdAgIhAQERAQUBChIGEwkJCQeICwEDEQ2jMmqLJ4FygxCOZgoZJwMKZIVuEQEFDoEei04Kgh4HgneBTAWEaQWUCAOBfYFIjDCEIxgphQ8hLw X-IronPort-AV: E=Sophos;i="5.01,603,1400018400"; d="scan'208";a="70198286" Received: from mail-qg0-f42.google.com ([209.85.192.42]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 04 Jul 2014 23:01:19 +0200 Received: by mail-qg0-f42.google.com with SMTP id e89so1818001qgf.15 for ; Fri, 04 Jul 2014 14:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ekFjfQw6FAHgMq8E5fkEzoDXZoC02es+3V1RPz9RXXk=; b=mxYEoBQTNmjE2aVT1EvYIk7ZDI1pK9Np6ay1EGZrwJV9YDjW+EuWIH8iMQjY/48Mx3 VnNtOofxN6UMQq8nnLWnWtTpYoGh3QSE/h6YMY7krM67bsLqLD3DqU43lNPITObbwbCj FPc5/1x+kB7Mf/2kuKrB3/3ePTmW8KLyXjF/wpXum4Fq6Ozi8TkSgxF7sPa1wdOC9K2A QY5idYUv6OA0YZXPFrJoiNtl2Iqlh6VTo3kdclA/vi6k6c/3ALbU/8RfdTZfYvwrNNlq OCs+FXTxUiBZVnO0mzZnTSCIwpZ3pD333OYQ+a6z8gsT2bzqoLxeXtgURnGjBSnqf338 9/Rg== MIME-Version: 1.0 X-Received: by 10.140.34.195 with SMTP id l61mr21072031qgl.87.1404507678396; Fri, 04 Jul 2014 14:01:18 -0700 (PDT) Received: by 10.140.19.174 with HTTP; Fri, 4 Jul 2014 14:01:18 -0700 (PDT) In-Reply-To: <1404501528.4384.4.camel@e130> References: <1404501528.4384.4.camel@e130> Date: Fri, 4 Jul 2014 17:01:18 -0400 Message-ID: From: Markus Mottl To: Gerd Stolpmann Cc: caml-list Content-Type: text/plain; charset=UTF-8 Subject: Re: [Caml-list] Immutable strings I agree that the new concept has some noteworthy downsides as demonstrated in the Lexing-example. Your proposed solution 2 (stringlike) would probably solve these issues from a safety point of view. The downside is that the complexity of string-handling would increase even more, because then we would have three types to deal with. I personally prefer safety over convenience, but other people's (especially beginner's) mileage may vary. The Bigarray-approach doesn't seem appealing to me. Strings are much more lightweight, since they can be allocated cheaply on the OCaml-heap. E.g. String.create is about 10x-100x faster than Bigarray.create. That seems too big to ignore. Regards, Markus On Fri, Jul 4, 2014 at 3:18 PM, Gerd Stolpmann 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 -- Markus Mottl http://www.ocaml.info markus.mottl@gmail.com