220 13712 <e6301c00-99e9-4bd8-a9f0-ad91cc3e5626@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Vlad from Moscow <vlad.moscow@mail.ru>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Generic std::size, a la std::begin
Date: Mon, 6 Oct 2014 11:16:26 -0700 (PDT)
Lines: 124
Approved: news@gmane.org
Message-ID: <e6301c00-99e9-4bd8-a9f0-ad91cc3e5626@isocpp.org>
References: <8808df5e-62c4-459d-acd9-00e63adb9476@isocpp.org> <20141004004445.GA8207@lenovo> <CB0A8C8F-02D1-449C-B41C-5AE9FE6AB069@gmail.com> <c698550a-9ed6-457c-9dcb-a8aed3d0b737@isocpp.org> <m0uhol$4u1$1@ger.gmane.org> <890596a6-4fe4-4fe4-b96b-0196aaac94cf@isocpp.org>
 <m0ujnf$2ae$1@ger.gmane.org>
 <fa0e8ded-3647-4654-b40b-cc7753c3f2c3@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_424_626440836.1412619386743"
X-Trace: ger.gmane.org 1412619397 5590 80.91.229.3 (6 Oct 2014 18:16:37 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 6 Oct 2014 18:16:37 +0000 (UTC)
Cc: mw_triad@users.sourceforge.net
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCXLLRHD7IDRB7FYZOQQKGQEJIK5IZA@isocpp.org Mon Oct 06 20:16:30 2014
Return-path: <std-proposals+bncBCXLLRHD7IDRB7FYZOQQKGQEJIK5IZA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pa0-f71.google.com ([209.85.220.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCXLLRHD7IDRB7FYZOQQKGQEJIK5IZA@isocpp.org>)
	id 1XbCph-0000ny-M1
	for gclcip-std-proposals@m.gmane.org; Mon, 06 Oct 2014 20:16:29 +0200
Original-Received: by mail-pa0-f71.google.com with SMTP id rd3sf41674325pab.10
        for <gclcip-std-proposals@m.gmane.org>; Mon, 06 Oct 2014 11:16:28 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:cc:message-id:in-reply-to
         :references:subject:mime-version:x-original-sender:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type;
        bh=DeqCT70JHZm1k6Ac38+pfTFotH4gXqwmS5INmo7X2Js=;
        b=fqv9vY0py64bd8nOx0LCW2jbZNwg/bffrhfPr2j+DXo8pXfNaMz+Xqm2FLvFh7G8Ox
         IzAS6pj07EyidxsySTKvV4WO73xmWDxC/dc8D6Qt6pYU0njCDckcTsg2Ck/P9UTXo+MJ
         u6aQYAAehtBJ3d3JXOorIZl8XLUt/FEWeqDuTFtZ3BwjX1PveerLAeVbsmOcJHm4o1gx
         UyH5ddPAap+VpNOyKNzy9qFMfXE8uSib36+dYdzDNvXRSarFuHO74gGCQDZWsf12jqBW
         S+xYFIro6KRnpwhJqCVA0O2rnftotMPUaLFfJp7lnUi3y/XhEQNNjiaIjRPufzcgpaja
         c62w==
X-Gm-Message-State: ALoCoQlVi5funBEArdvgwDwbraIxr7vtgTJ3yUPCc88HNlF53fRe9u9m/e4nQ4WARmldEN5sdCCw
X-Received: by 10.66.171.10 with SMTP id aq10mr16725843pac.28.1412619388624;
        Mon, 06 Oct 2014 11:16:28 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.27.201 with SMTP id 67ls1155050qgx.24.gmail; Mon, 06 Oct
 2014 11:16:27 -0700 (PDT)
X-Received: by 10.140.37.39 with SMTP id q36mr35867qgq.10.1412619387931;
        Mon, 06 Oct 2014 11:16:27 -0700 (PDT)
In-Reply-To: <fa0e8ded-3647-4654-b40b-cc7753c3f2c3@isocpp.org>
X-Original-Sender: vlad.moscow@mail.ru
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>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:13712
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/13712>

------=_Part_424_626440836.1412619386743
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Also some containers as for example associative containers have member=20
function count. So using general function with the same name will only=20
confuse users.


=D0=BF=D0=BE=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA, 6 =D0=
=BE=D0=BA=D1=82=D1=8F=D0=B1=D1=80=D1=8F 2014 =D0=B3., 21:42:54 UTC+4 =D0=BF=
=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Vlad fro=
m=20
Moscow =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:

> I do not see any ambiguity between size and sizeof. I see an ambiguity=20
> between member function size and count and betwwen member functions begin=
=20
> and end and general functions begin and end on the one hand and member=20
> function size and general function count on the other hand.
>
> =D0=BF=D0=BE=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA, 6 =D0=
=BE=D0=BA=D1=82=D1=8F=D0=B1=D1=80=D1=8F 2014 =D0=B3., 21:32:48 UTC+4 =D0=BF=
=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Matthew=
=20
> Woehlke =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:
>>
>> On 2014-10-06 13:19, Vlad from Moscow wrote:=20
>> > Name size is much better.=20
>>
>> I disagree.=20
>>
>> > we could have member function size for containers and=20
>> > general function size that can be also applied to arrays,=20
>>
>> ...or we could have member functions *'count'*, as Myriachan mentioned=
=20
>> :-). Qt got this right.=20
>>
>>   int foo[5];=20
>>   sizeof(foo); // 20, of course=20
>>   size(foo); // er... 20? right? why would the "of" change it?=20
>>   size(*foo); // this is legal, yes? and =3D=3D 4?=20
>>   count(foo); // unambiguously it is 5, *not* 20=20
>>
>> --=20
>> Matthew=20
>>
>>

--=20

---=20
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 e=
mail 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-proposa=
ls/.

------=_Part_424_626440836.1412619386743
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Also some containers as for example associative conta=
iners have member function count. So using general function with the same n=
ame will only confuse users.</div><div><br><br>=D0=BF=D0=BE=D0=BD=D0=B5=D0=
=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA, 6 =D0=BE=D0=BA=D1=82=D1=8F=D0=B1=
=D1=80=D1=8F 2014&nbsp;=D0=B3., 21:42:54 UTC+4 =D0=BF=D0=BE=D0=BB=D1=8C=D0=
=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Vlad from Moscow =D0=BD=D0=B0=
=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:</div><blockquote class=3D"gmail_quote" styl=
e=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(2=
04, 204, 204); border-left-width: 1px; border-left-style: solid;"><div dir=
=3D"ltr">I do not see any ambiguity between size and sizeof. I see an ambig=
uity between member function size and count and betwwen member functions be=
gin and end and general functions begin and end on the one hand and member =
function size and general function count on the other hand.<br><br>=D0=BF=
=D0=BE=D0=BD=D0=B5=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA, 6 =D0=BE=D0=
=BA=D1=82=D1=8F=D0=B1=D1=80=D1=8F 2014&nbsp;=D0=B3., 21:32:48 UTC+4 =D0=BF=
=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Matthew =
Woehlke =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:<blockquote class=3D"gma=
il_quote" style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-lef=
t-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: sol=
id;">On 2014-10-06 13:19, Vlad from Moscow wrote:
<br>&gt; Name size is much better.
<br>
<br>I disagree.
<br>
<br>&gt; we could have member function size for containers and=20
<br>&gt; general function size that can be also applied to arrays,
<br>
<br>...or we could have member functions *'count'*, as Myriachan mentioned
<br>:-). Qt got this right.
<br>
<br>&nbsp; int foo[5];
<br>&nbsp; sizeof(foo); // 20, of course
<br>&nbsp; size(foo); // er... 20? right? why would the "of" change it?
<br>&nbsp; size(*foo); // this is legal, yes? and =3D=3D 4?
<br>&nbsp; count(foo); // unambiguously it is 5, *not* 20
<br>
<br>--=20
<br>Matthew
<br>
<br></blockquote></div></blockquote></div>

<p></p>

-- <br />
<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 <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_424_626440836.1412619386743--

.
