220 4822 <2c8e6079-9c87-425a-93e2-39251df57cd8@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: carrierandoperator@yahoo.co.uk
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Proposal: std::sequence
Date: Mon, 3 Jun 2013 09:22:31 -0700 (PDT)
Lines: 88
Approved: news@gmane.org
Message-ID: <2c8e6079-9c87-425a-93e2-39251df57cd8@isocpp.org>
References: <4551abbc-43aa-4520-a91a-f8eb25a90588@isocpp.org>
 <e915df62-4930-48ee-a8ac-64261c407234@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_410_2407091.1370276551780"
X-Trace: ger.gmane.org 1370276557 4080 80.91.229.3 (3 Jun 2013 16:22:37 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 3 Jun 2013 16:22:37 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDQ2R4E5RIKBBSEFWOGQKGQEFKNIMHQ@isocpp.org Mon Jun 03 18:22:38 2013
Return-path: <std-proposals+bncBDQ2R4E5RIKBBSEFWOGQKGQEFKNIMHQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yh0-f70.google.com ([209.85.213.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDQ2R4E5RIKBBSEFWOGQKGQEFKNIMHQ@isocpp.org>)
	id 1UjXWk-0000v4-7k
	for gclcip-std-proposals@m.gmane.org; Mon, 03 Jun 2013 18:22:34 +0200
Original-Received: by mail-yh0-f70.google.com with SMTP id c41sf1711725yho.5
        for <gclcip-std-proposals@m.gmane.org>; Mon, 03 Jun 2013 09:22:33 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=x-beenthere:date:from:to:message-id:in-reply-to:references:subject
         :mime-version:x-original-sender:reply-to:precedence:mailing-list
         :list-id:x-google-group-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=JtHMGNDwv7L8+B/aTlifr2kgssvc2HzBJyfsmaFHoRw=;
        b=C/GyszdfueO6b19aN1MTHCN9JOmNnG+qaH0hlxv+ttPNbsitXbs0LxQ2ASxI9+dy9G
         xMbTwDrEO7bTPIMidayLDI/79yOsRPaXUxUU1DdJ6rVEoRBCB8ZKExwlLBt80tiCoW5u
         2uYYLHsyivQaP95/i7br16p0im9QrJMyykeyukpFwS/DmlCBI2pLU4yVhlnj854aomYp
         dMI4bFKlp9F+6rTPd7N4a7BRzwmDSdS/cNCHh/CJUlOCVUQi24iZhpaxnEhGHtXp1wOL
         mXs4Jp5QLFCVr/EMVb5bUhz9Ca4XSpo9zwU8U8P00GTomgkf5gyW0ennNRRVJXDS6soE
         Z1WQ==
X-Received: by 10.236.84.177 with SMTP id s37mr12325233yhe.37.1370276553270;
        Mon, 03 Jun 2013 09:22:33 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.0.113 with SMTP id 17ls2345195qed.28.gmail; Mon, 03 Jun
 2013 09:22:32 -0700 (PDT)
X-Received: by 10.49.72.130 with SMTP id d2mr1691367qev.42.1370276552221;
        Mon, 03 Jun 2013 09:22:32 -0700 (PDT)
In-Reply-To: <e915df62-4930-48ee-a8ac-64261c407234@isocpp.org>
X-Original-Sender: carrierandoperator@yahoo.co.uk
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post?hl=en>,
 <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?hl=en&topic=25838>,
 <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe?hl=en>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:4822
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/4822>

------=_Part_410_2407091.1370276551780
Content-Type: text/plain; charset=ISO-8859-1


On Monday, June 3, 2013 10:40:10 AM UTC-4, Jonathan Wakely wrote:
>
> This looks similar to the array_ref proposal from 
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3334.html


Thanks for pointing that out, Jonathan. There is much similarity to 
LLVM's `llvm::ArrayRef and `llvm::MutableArrayRef`, which the array_ref 
proposal drew from. I didn't know about the array_ref proposal.

The primary differences between sequences and array_refs are:

   - array_ref elements are immutable. The mutable variant 
   (`llvm::MutableArrayRef`) was omitted from the array_ref proposal.
   - sequence elements may be immutable or mutable (similar 
   to `llvm::MutableArrayRef`)
   - array_ref provides mutator member functions so that the pointer and 
   length of an instance's represented array may be modified (shrunk in place 
   from either end or reset).
   - sequences do not provide member or length mutators (as outlined). This 
   was by design; it restricts mobility and misuse, while adding some 
   opportunity for optimization with the expense that more temporary sequences 
   will be created in some scenarios.
   - The array_ref proposal adds string_ref, which is similar to array_ref 
   with a few extra member functions for common string operations.

-- 

--- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.



------=_Part_410_2407091.1370276551780
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br>On Monday, June 3, 2013 10:40:10 AM UTC-4, Jonathan Wakely wrote:<block=
quote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-le=
ft: 1px #ccc solid;padding-left: 1ex;">This looks similar to the array_ref =
proposal from <a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers=
/2012/n3334.html" target=3D"_blank">http://www.open-std.org/jtc1/<wbr>sc22/=
wg21/docs/papers/2012/<wbr>n3334.html</a></blockquote><div><br></div><div>T=
hanks for pointing that out, Jonathan. There is much similarity to LLVM's&n=
bsp;`llvm::ArrayRef and&nbsp;`llvm::MutableArrayRef`, which the array_ref p=
roposal drew from. I didn't know about the array_ref proposal.</div><div><b=
r></div><div>The primary differences between sequences and array_refs are:<=
/div><div><ul><li><span style=3D"line-height: normal;">array_ref elements a=
re immutable. The mutable variant (`llvm::MutableArrayRef`) was omitted fro=
m the array_ref proposal.<br></span></li><li><span style=3D"line-height: no=
rmal;">sequence elements may be immutable or mutable (similar to&nbsp;`llvm=
::MutableArrayRef`)<br></span></li><li><span style=3D"line-height: normal;"=
>array_ref provides mutator member functions so that the pointer and length=
 of an instance's represented array may be modified (shrunk in place from e=
ither end or reset).</span></li><li><span style=3D"line-height: normal; ">s=
equences do not provide member or length mutators&nbsp;(as outlined). This =
was by design; it restricts mobility and misuse, while adding some opportun=
ity for optimization with the expense that more temporary sequences will be=
 created in some scenarios.</span></li><li><span style=3D"line-height: norm=
al; ">The array_ref proposal adds string_ref, which is similar to array_ref=
 with a few extra member functions for common string operations.</span></li=
></ul></div>

<p></p>

-- <br />
&nbsp;<br />
--- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/?hl=3Den">http://groups.google.com/a/isocpp.org/group/std-pro=
posals/?hl=3Den</a>.<br />
&nbsp;<br />
&nbsp;<br />

------=_Part_410_2407091.1370276551780--

.
