220 7469 <a83cc8cd-82d1-4073-834c-3fdc7381a157@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Evgeny Panasyuk <evgeny.panasyuk@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: To add the method append for all sequential
 containers that have method push_back
Date: Thu, 24 Oct 2013 05:50:42 -0700 (PDT)
Lines: 87
Approved: news@gmane.org
Message-ID: <a83cc8cd-82d1-4073-834c-3fdc7381a157@isocpp.org>
References: <4167b82e-a3cc-44ce-9825-b52514bc1531@isocpp.org>
 <357325b0-cec5-4d22-ad56-9bb66f76b458@isocpp.org> <c98342aa-14d6-4fc6-8499-234c5e44e894@isocpp.org>
 <983ff074-5d8c-488a-b06c-49d53d5b7a5b@isocpp.org> <f47679d2-be05-4fdf-aea6-c617eb291aad@isocpp.org>
 <369298d9-3f8b-405a-8bfe-ae209372a26f@isocpp.org> <CAPBZbvzVuUKHsNSWz+KQPBzB1KJh0KgaY_cv6XuCwuhbZRhgHw@mail.gmail.com>
 <f844b34d-f64b-430d-9328-e44246a89238@isocpp.org> <f651b25b-213e-4c22-bd6e-17c96fde46a7@isocpp.org>
 <e826236a-84aa-4623-9510-014881b55004@isocpp.org> <5266DEEC.7090805@gmail.com>
 <eec4b9ca-711c-4b64-bac5-3c08bd3361a8@isocpp.org> <7c9a2637-65d8-4d54-bd3c-b46c0c22b34f@isocpp.org>
 <70a718dd-eca7-4845-8e9c-0313581ed453@isocpp.org> <6b9f62b2-21b1-4c62-a815-217d77a59a23@isocpp.org>
 <df68e700-1cb4-4af5-ba94-e4b589f33e0e@isocpp.org> <0e98fae6-2dc5-4e50-8659-5334012c4dd4@isocpp.org>
 <0d945506-2a09-4645-a68e-ada2b9898aa9@isocpp.org> <69dd52d3-c35e-4391-b998-d1a35c4599d6@isocpp.org>
 <e853f305-0999-437a-840c-3d829a24566d@isocpp.org> <CAGg_6+OvEyyLFZcGqo2xc0aDu4MeYiCmWMymW1YVNPJqJ1+S7A@mail.gmail.com>
 <CAFk2RUYQ1LkfCO5yXWPeStcadYuz7AO4V5bH=mfQMFNm45GM0Q@mail.gmail.com>
 <CAGsORuAyVwKGwdGMyAc3rg1KbOA3AXuYWwgubkXgt-oQRH9AiQ@mail.gmail.com>
 <fcf8d15e-af56-4351-bc4b-2e5984399240@isocpp.org> <CAGg_6+Ph8FRc+939QVuJbzYtbo-ef3zGqPsPFjXCY9AUDLPAFQ@mail.gmail.com>
 <CAGsORuAcTDjMcXVoAQ+MEUZ6DL0PEDW32RWDQSf4EyxS+Ln=tw@mail.gmail.com>
 <CAGsORuC0hbic60tY3sVng8K+-qMmekp83kq4Jed36O2+BQ5=UQ@mail.gmail.com>
 <0001b7d6-42ab-4f47-8104-1c5e93ecfbc4@isocpp.org> <CAPBZbvx-rmW3HcG+3WQrNbQ1gzr8UDj=2Xx+gRNOyhj5au61Xg@mail.gmail.com>
 <03ecdc90-1973-4e34-82c9-ab0043241a2b@isocpp.org> <CAPBZbvz+6=0bZsKAkrz=wn3whEr3_fnJ4dRaS8p-vTaVpEeB0w@mail.gmail.com>
 <94c6cdf1-e640-4cc9-9c4b-e2605610a715@isocpp.org> <8e3f0b94-b0a3-43e2-9a2c-853734b9d6c3@isocpp.org>
 <CAPBZbvxHA1WBRWwO=a_jtopVg_SsukvihJ_d9n8-oEbPwGSUCg@mail.gmail.com> <ad2c91f1-25f1-4ea5-8cb9-fd4f6f52bc4e@isocpp.org>
 <CAPBZbvzkJCYYJBAC+8aD3hwqjskwE-4Xj7CzzrgkG1F=NQzDDw@mail.gmail.com>
 <8a1bd904-ecea-4317-9dac-42122876f491@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_3099_20542618.1382619042848"
X-Trace: ger.gmane.org 1382619045 25673 80.91.229.3 (24 Oct 2013 12:50:45 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 24 Oct 2013 12:50:45 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC54TLGKR4LBBJFPUSJQKGQEVTFD7GQ@isocpp.org Thu Oct 24 14:50:48 2013
Return-path: <std-proposals+bncBC54TLGKR4LBBJFPUSJQKGQEVTFD7GQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pb0-f72.google.com ([209.85.160.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC54TLGKR4LBBJFPUSJQKGQEVTFD7GQ@isocpp.org>)
	id 1VZKND-0006vA-2i
	for gclcip-std-proposals@m.gmane.org; Thu, 24 Oct 2013 14:50:47 +0200
Original-Received: by mail-pb0-f72.google.com with SMTP id jt11sf3818252pbb.11
        for <gclcip-std-proposals@m.gmane.org>; Thu, 24 Oct 2013 05:50:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to: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=oyOFT2TIoWtR/cOrqNCtbbCxtptje2Y5JpLXcwaI0so=;
        b=jPjxJ22XORFiFWnoxu14ThkltiejXQa+CA1E4hrg8b/HUlPuZrbOaJ4XvMEm3QV7WU
         RkeZREc/Zgq8LSg7i5k3OING+AJn7YDLKomOfCA9eWMEL11zbkFYl2CK4FC8/e36f8Dx
         ux8R/m1cQq7bXMg4WUD/UmcMCg+DSC0f9uq/rW12L3/AAIg/mn/7VAbwx/cCaVV944n7
         naTz+ydIXXSocBH4RvE3JhvFws2HHhBEu2f3UXLgt3FGjokJRgCgdF1M1qDXYibBfeRS
         /iwu3l5srEP4YFw/cRbo4NKxJ0H1p8BQYGZFjW9/PVpEqadi+SO5/SwQ5b3yPMKvWgpp
         CVBA==
X-Received: by 10.66.141.46 with SMTP id rl14mr643479pab.44.1382619045360;
        Thu, 24 Oct 2013 05:50:45 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.118.6 with SMTP id ki6ls1255722igb.20.gmail; Thu, 24 Oct
 2013 05:50:44 -0700 (PDT)
X-Received: by 10.50.20.38 with SMTP id k6mr42291ige.17.1382619044171;
        Thu, 24 Oct 2013 05:50:44 -0700 (PDT)
In-Reply-To: <8a1bd904-ecea-4317-9dac-42122876f491@isocpp.org>
X-Original-Sender: evgeny.panasyuk@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>, <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: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:7469
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/7469>

------=_Part_3099_20542618.1382619042848
Content-Type: text/plain; charset=ISO-8859-1


>
> To make function append a non-member function in my opinion  is simply a 
> bad idea. 
> In fact in this case inside the function you will call method insert 
> because there is no other possibility in this design. So it is not 
> effective.
>

About which possibility you are talking? Non-member function can be easily 
overloaded, providing special version when required.
 

> Moreover this design only confuses users because you must list those 
> containers that can be used with this function.
>

There is no need to list all such containers - there can be many 
user-defined containers. std::sort works on random access iterators, and it 
does not list all of them.
Only requirenments/concepts can be listed.
 

> I understand that it can be a new silly question in interview: 
> list the containers that can be used with this function and with that 
> frunction.
>  It is a very poor design.
>

That question is literally equal to "list containers which have this and 
that function".
 

-- 

--- 
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/.

------=_Part_3099_20542618.1382619042848
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><blockquote class=3D"gmail_quote" style=3D"margin: 0;margi=
n-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"l=
tr"><div>To make function append a non-member function in my opinion&nbsp; =
is simply a bad idea. </div><div>In fact in this case inside the function y=
ou will call method insert because there is no other possibility in this de=
sign. So it is not effective.</div></div></blockquote><div><br>About which =
possibility you are talking? Non-member function can be easily overloaded, =
providing special version when required.<br>&nbsp;</div><blockquote class=
=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #cc=
c solid;padding-left: 1ex;"><div dir=3D"ltr"><div>Moreover this design only=
 confuses users because you must list those containers that can be used wit=
h this function.</div></div></blockquote><div><br>There is no need to list =
all such containers - there can be many user-defined containers. std::sort =
works on random access iterators, and it does not list all of them.<br>Only=
 requirenments/concepts can be listed.<br>&nbsp;</div><blockquote class=3D"=
gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc so=
lid;padding-left: 1ex;"><div dir=3D"ltr"><div>I understand that it can be a=
 new silly question in interview: list&nbsp;the&nbsp;containers that can be=
 used with this function and with that frunction.</div><div>&nbsp;It is a v=
ery poor design.</div></div></blockquote><div><br>That question is literall=
y equal to "list containers which have this and that function".<br>&nbsp;</=
div></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/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

------=_Part_3099_20542618.1382619042848--

.
