220 4833 <dc5d7e0d-6e4e-46a0-ade8-5aaba986ebfc@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Alex B <devalexb@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Proposal: std::sequence
Date: Mon, 3 Jun 2013 13:24:12 -0700 (PDT)
Lines: 103
Approved: news@gmane.org
Message-ID: <dc5d7e0d-6e4e-46a0-ade8-5aaba986ebfc@isocpp.org>
References: <4551abbc-43aa-4520-a91a-f8eb25a90588@isocpp.org>
 <e915df62-4930-48ee-a8ac-64261c407234@isocpp.org> <2c8e6079-9c87-425a-93e2-39251df57cd8@isocpp.org>
 <CANh-dX=va9uLSbvQc_TRmf8o5TDzQutmkxJDc64g7b=yKyN7sg@mail.gmail.com>
 <9f1cace3-0503-4a3c-a8ce-d7546564b3ef@isocpp.org>
 <a6f024b6-45d6-4c3b-b8a6-3f056aeab51f@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_966_20379093.1370291052467"
X-Trace: ger.gmane.org 1370291054 2684 80.91.229.3 (3 Jun 2013 20:24:14 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 3 Jun 2013 20:24:14 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC7JZJ43WYOBB3PWWOGQKGQEE42KG5Y@isocpp.org Mon Jun 03 22:24:15 2013
Return-path: <std-proposals+bncBC7JZJ43WYOBB3PWWOGQKGQEE42KG5Y@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-gg0-f198.google.com ([209.85.161.198])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC7JZJ43WYOBB3PWWOGQKGQEE42KG5Y@isocpp.org>)
	id 1UjbId-0007xy-1a
	for gclcip-std-proposals@m.gmane.org; Mon, 03 Jun 2013 22:24:15 +0200
Original-Received: by mail-gg0-f198.google.com with SMTP id p1sf5076107ggn.9
        for <gclcip-std-proposals@m.gmane.org>; Mon, 03 Jun 2013 13:24:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.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=pWNN5w4+iwv9QD42Thg/53WPXBw3SmeGSKoovCwtJWE=;
        b=X2PRda7psDx0RHoyfnEqQNe7N7wDXRHxqLvLsUSrRta/Ekl+RYEF+QV6aqla9FAgPx
         z74VB/vHjOXAUYZyNrnF9tGDnAOwW7VuyIa5PZdjPoDpHawKOpFr97/oBmU5904PWGHZ
         Beh1xvWLaFV8Qx3h6F8bLonzw+oWEdYhQXXo77SecvPjrurIQsa7uTo4/sMLnZGOvjfx
         5AtGdMglBM0xDzPifHZK6IrcHgFtVbDN9WX3dzhu4a8jREJQC1C4pfEaWs4lH1jLphv8
         lujmvpnqNYgRt4LRo5xL0jRBSiHkzNQvc3QG3ibteA3JZfPWCs2+s+qK/+7sTxxn2gsb
         5VPw==
X-Received: by 10.236.80.106 with SMTP id j70mr13771390yhe.11.1370291054177;
        Mon, 03 Jun 2013 13:24:14 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.99.72 with SMTP id eo8ls277257qeb.89.gmail; Mon, 03 Jun
 2013 13:24:13 -0700 (PDT)
X-Received: by 10.49.27.138 with SMTP id t10mr543103qeg.31.1370291053037;
        Mon, 03 Jun 2013 13:24:13 -0700 (PDT)
In-Reply-To: <a6f024b6-45d6-4c3b-b8a6-3f056aeab51f@isocpp.org>
X-Original-Sender: devalexb@gmail.com
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:4833
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/4833>

------=_Part_966_20379093.1370291052467
Content-Type: text/plain; charset=ISO-8859-1



> And LLVM and Google have gotten by with types that are equally lightweight 
> and shortlived, yet *theirs* are assignable and adjustable in size. Why 
> should we use yours instead of theirs (ie: array_ref)?
>

Yet, in the (unfortunately rejected and thrown to abyss) proposal, there is 
no mutable version of the class provided. That makes it at least one reason 
to (maybe) reconsider it.

Personally, I am against allowing assignment. What do you think most users 
would expect from the following code?:

void foo(mutable_array_ref<int> a, array_ref<int> b)
{
   a = b;
   ...
}

Was the intent of the user to copy-assign the elements from b to a? That is 
not what will happen. Yet, most users will expect to use an array_ref just 
the same way they would use a container/range. And not only users: template 
code as well.

So unless one can provide actual use cases for assignment operator, I don't 
think it would be a good idea to provide one since it could be misleading.

-- 

--- 
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_966_20379093.1370291052467
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex=
;border-left: 1px #ccc solid;padding-left: 1ex;"><div>And LLVM and Google h=
ave gotten by with types that are equally lightweight and shortlived, yet <=
i>theirs</i> are assignable and adjustable in size. Why should we use yours=
 instead of theirs (ie: array_ref)?<br></div></blockquote><div><br></div><d=
iv>Yet, in the (unfortunately rejected and thrown to abyss) proposal, there=
 is no mutable version of the class provided. That makes it at least one re=
ason to (maybe) reconsider it.</div><div><br></div><div>Personally, I am ag=
ainst allowing assignment. What do you think most users would expect from t=
he following code?:</div><div><br></div><div class=3D"prettyprint" style=3D=
"background-color: rgb(250, 250, 250); border: 1px solid rgb(187, 187, 187)=
; word-wrap: break-word;"><code class=3D"prettyprint"><div class=3D"subpret=
typrint"><span style=3D"color: #008;" class=3D"styled-by-prettify">void</sp=
an><span style=3D"color: #000;" class=3D"styled-by-prettify"> foo</span><sp=
an style=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=
=3D"color: #000;" class=3D"styled-by-prettify">mutable_array_ref</span><spa=
n style=3D"color: #080;" class=3D"styled-by-prettify">&lt;int&gt;</span><sp=
an style=3D"color: #000;" class=3D"styled-by-prettify"> a</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color=
: #000;" class=3D"styled-by-prettify"> array_ref</span><span style=3D"color=
: #080;" class=3D"styled-by-prettify">&lt;int&gt;</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify"> b</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">)</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"><br></span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">{</span><span style=3D"color: #000;" class=3D"styled-by-p=
rettify"><br>&nbsp; &nbsp;a </span><span style=3D"color: #660;" class=3D"st=
yled-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled-by=
-prettify"> b</span><span style=3D"color: #660;" class=3D"styled-by-prettif=
y">;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br>&n=
bsp; &nbsp;</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>...</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></=
span><span style=3D"color: #660;" class=3D"styled-by-prettify">}</span></di=
v></code></div><div><br></div><div>Was the intent of the user to copy-assig=
n the elements from b to a? That is not what will happen. Yet, most users w=
ill expect to use an array_ref just the same way they would use a container=
/range. And not only users: template code as well.</div><div><br></div><div=
>So unless one can provide actual use cases for assignment operator, I don'=
t think it would be a good idea to provide one since it could be misleading=
..</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_966_20379093.1370291052467--

.
