220 33859 <829f1a52-f28a-4aca-92fd-bb4e98e865dc@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Niall Douglas <nialldouglas14@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: string_view for fstream::open()
Date: Sat, 12 Aug 2017 08:23:44 -0700 (PDT)
Lines: 101
Approved: news@gmane.org
Message-ID: <829f1a52-f28a-4aca-92fd-bb4e98e865dc@isocpp.org>
References: <cb7b55ab-7113-4d99-949b-8568627d0b7f@isocpp.org> <CANh-dX=_vJGW1nxKEEjiSJ_=-+hkUab6i5KVSWJYe03ooBmnfA@mail.gmail.com> <CAA7U3HM=a7==w_ruj=7XAE-00KC2nDJh5wtodhQgW3v8LuVWEA@mail.gmail.com>
 <3456831.gsseCm4DuK@tjmaciei-mobl1>
 <6240d6af-a518-4788-a56f-b7d0c8976dc4@isocpp.org>
 <01739e89-fc83-428b-94d5-e4e06927cc80@isocpp.org>
 <c779961a-2aa5-437f-994e-d7df2573e8f5@isocpp.org>
 <25b20004-c1b3-4844-b957-ef57e043b533@isocpp.org>
 <15b49197-b38b-47be-aefb-0786af7635f2@isocpp.org>
 <188dc31c-df5e-4fe1-ad85-847d3d732880@isocpp.org>
 <586cd0e2-2fd9-4af0-814c-7ca19ecac410@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_3052_1391438201.1502551424426"
X-Trace: blaine.gmane.org 1502551430 23970 195.159.176.226 (12 Aug 2017 15:23:50 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 12 Aug 2017 15:23:50 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDGKFT5YZADRBAN3XTGAKGQETJC7T4A@isocpp.org Sat Aug 12 17:23:44 2017
Return-path: <std-proposals+bncBDGKFT5YZADRBAN3XTGAKGQETJC7T4A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-it0-f70.google.com ([209.85.214.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDGKFT5YZADRBAN3XTGAKGQETJC7T4A@isocpp.org>)
	id 1dgYGK-0005eq-Ob
	for gclcip-std-proposals@m.gmane.org; Sat, 12 Aug 2017 17:23:40 +0200
Original-Received: by mail-it0-f70.google.com with SMTP id c196sf69005644itc.2
        for <gclcip-std-proposals@m.gmane.org>; Sat, 12 Aug 2017 08:23:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        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;
        bh=F72nnJw3q9snq0jUm33+18WzVPWdwzGRFHYgtkbY9JU=;
        b=tZvqMGJX+Iw17WS7lsxKcQzZBiAxmhjZc3ZuvfgUQMZzq5Fpt/LfTLC4XBw0iEOGJl
         MpM+M4HEjR3792ITyKFrJCWhZoC2AHjIpGFzbVRw7r++3HKRGCwwpQXFXk0CBkU4B4MM
         otJK/xu/SBKyFCUWl29WO5tmAAxFznVtR/zEIGnXOonMzsDx3VnTGWRYcDKe6DrEaBGo
         5cqG1vxTSzZe+rbkPYer549flusWwlVsPes+Z45zFjqpEY5XqcHLZiPJR5fO8SGfMx42
         3TMfnu65mZ/2oHBwCYaiW6EUyXYIfzOmHySX5YLIX/h6EOD46tKPZ1y1eTrtcFp6b84z
         88Qg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        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;
        bh=F72nnJw3q9snq0jUm33+18WzVPWdwzGRFHYgtkbY9JU=;
        b=Y9QUmgU9mrecvGlg5coyqRAqRQvy6tK9loqQPvdqXBiladuUSTpRYBS1F7BISY7D0/
         zpyQy27O/7fgVdbueKnAySt2Jhz9piv9n2xtXHGWT6UfBD5xzNNwn84vwtgyBez0NceU
         kgv1ARIEnXVFxFsBqYDtZMgneUPgSWaVq3VlSQPAHIzYha+BTMFW7b8zqmHcecSRxRNO
         QBmGKtk5oYCwQQ6objSMTEu35E4PzHfHSOvtbYH5zw3Q6EXiwOEAmxkXcUHKI6Ily8K6
         cGIEfHcT09WuE4aTubRZz8zmLwDylW60BYKV1i7mXPMEtLN1w0NE+fpnRydZ0IdPE9li
         iKlA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=F72nnJw3q9snq0jUm33+18WzVPWdwzGRFHYgtkbY9JU=;
        b=mU4vORSkVTcHezXy+Cc0S2bWQ+NWr2NKOombYwoZ4I3Dg6N7c0fOqIDVQy/oqKdawY
         +8Ej66vWmAmHDgOeHoYLMDLCqK+RjmtqlmWg7pD/DINBmjW+YHzlb8bKMifDBuHfIuxU
         cP8SmYEVvYpfodFUmF0yL4cYc12K9ZyWUujxXpgOszEdRf0UPC1psXZV6eJp8xZkIWtx
         EzLJeHlXRefxyoooUAE/Cjn/oGXip7dEl/MfX7PSeWw+8TrHqzcCO8/KBvXEbXN10baF
         JaMrGmH7Dwal6JXyl6TdecklGc57aKP1P5sECUA+n+GyhcKfeGAOO2EwL8dUhpnHvxAp
         skfA==
X-Gm-Message-State: AHYfb5gI8lHlnp+G1X5zg2Y36C1q6hWml47ncXFIUPMskDONgt5qOVH8
	PT6XkOwL+SZKLVv/
X-Received: by 10.107.8.138 with SMTP id h10mr11978108ioi.132.1502551426565;
        Sat, 12 Aug 2017 08:23:46 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.12.201 with SMTP id 70ls2833291iom.22.gmail; Sat, 12 Aug
 2017 08:23:45 -0700 (PDT)
X-Received: by 10.31.9.212 with SMTP id 203mr108591vkj.28.1502551425074;
        Sat, 12 Aug 2017 08:23:45 -0700 (PDT)
In-Reply-To: <586cd0e2-2fd9-4af0-814c-7ca19ecac410@isocpp.org>
X-Original-Sender: nialldouglas14@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: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://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>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:33859
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33859>

------=_Part_3052_1391438201.1502551424426
Content-Type: multipart/alternative; 
	boundary="----=_Part_3053_1734689408.1502551424426"

------=_Part_3053_1734689408.1502551424426
Content-Type: text/plain; charset="UTF-8"

On Friday, August 11, 2017 at 11:48:14 PM UTC+1, Nicol Bolas wrote:
>
> On Friday, August 11, 2017 at 6:29:23 PM UTC-4, Niall Douglas wrote:
>>
>>
>>> Or we can just have a single `filesystem::path` type, which you can get 
>>> views of with existing types. I prefer that option.
>>>
>>
>> As already covered in great detail by now, if fed a string_view then one 
>> is mandated to memcpy the lot so it can be zero terminated before sending 
>> it to the file path consuming syscall.
>>
>
> A problem easily solved with the types we're talking about. We don't need 
> a replacement for `filesystem::path`. We *certainly* don't need some 32KB 
> type...
>

I hate to be slightly rude, but you really don't know what you're talking 
about on this.

Try doing some benchmarking of the actual cost of a potentially unused 64Kb 
stack allocation in a routine which calls any path consuming syscall, and 
compare it to any other solution. Then feel free to retract your claim 
above.

Furthermore, you once again misrepresent what I said. Nobody is replacing 
filesystem::path. afio::path_view *complements* filesystem::path with a 
usefully orthogonal API design. AFIO itself switches between both path_view 
and path as appropriate to use case. So will any other code. That's why the 
design is so correct, path_view does not replace path, it *augments* it.

Niall
 

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/829f1a52-f28a-4aca-92fd-bb4e98e865dc%40isocpp.org.

------=_Part_3053_1734689408.1502551424426
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Friday, August 11, 2017 at 11:48:14 PM UTC+1, Nicol Bol=
as wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: =
0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">On F=
riday, August 11, 2017 at 6:29:23 PM UTC-4, Niall Douglas wrote:<blockquote=
 class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px =
#ccc solid;padding-left:1ex"><div dir=3D"ltr"><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding=
-left:1ex"><div dir=3D"ltr"><div><br>Or we can just have a single `filesyst=
em::path` type, which you can get views of with existing types. I prefer th=
at option.</div></div></blockquote><div><br></div><div>As already covered i=
n great detail by now, if fed a string_view then one is mandated to memcpy =
the lot so it can be zero terminated before sending it to the file path con=
suming syscall.</div></div></blockquote><div><br>A problem easily solved wi=
th the types we&#39;re talking about. We don&#39;t need a replacement for `=
filesystem::path`. We <i>certainly</i> don&#39;t need some 32KB type...<br>=
</div></div></blockquote><div><br></div><div>I hate to be slightly rude, bu=
t you really don&#39;t know what you&#39;re talking about on this.</div><di=
v><br></div><div>Try doing some benchmarking of the actual cost of a potent=
ially unused 64Kb stack allocation in a routine which calls any path consum=
ing syscall, and compare it to any other solution. Then feel free to retrac=
t your claim above.</div><div><br></div><div>Furthermore, you once again mi=
srepresent what I said. Nobody is replacing filesystem::path. afio::path_vi=
ew <i>complements</i>=C2=A0filesystem::path with a usefully orthogonal API =
design. AFIO itself switches between both path_view and path as appropriate=
 to use case. So will any other code. That&#39;s why the design is so corre=
ct, path_view does not replace path, it <i>augments</i>=C2=A0it.</div><div>=
<br></div><div>Niall</div><div>=C2=A0</div></div>

<p></p>

-- <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 />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/829f1a52-f28a-4aca-92fd-bb4e98e865dc%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/829f1a52-f28a-4aca-92fd-bb4e98e865dc=
%40isocpp.org</a>.<br />

------=_Part_3053_1734689408.1502551424426--

------=_Part_3052_1391438201.1502551424426--

.
