From reviews-return-2625-apmail-mesos-reviews-archive=mesos.apache.org@mesos.apache.org Tue Jun 9 23:51:07 2015 Return-Path: X-Original-To: apmail-mesos-reviews-archive@minotaur.apache.org Delivered-To: apmail-mesos-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9B8A217A19 for ; Tue, 9 Jun 2015 23:51:07 +0000 (UTC) Received: (qmail 72759 invoked by uid 500); 9 Jun 2015 23:51:07 -0000 Delivered-To: apmail-mesos-reviews-archive@mesos.apache.org Received: (qmail 72734 invoked by uid 500); 9 Jun 2015 23:51:07 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 72720 invoked by uid 99); 9 Jun 2015 23:51:07 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jun 2015 23:51:07 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 1D8E61DF939; Tue, 9 Jun 2015 23:51:06 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============6942103213030136926==" MIME-Version: 1.0 Subject: Re: Review Request 35179: MESOS-1733 Variadic Path Join From: "Cody Maloney" To: "Cody Maloney" , "Adam B" Cc: "Anand Mazumdar" , "mesos" Date: Tue, 09 Jun 2015 23:51:06 -0000 Message-ID: <20150609235106.27736.92393@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Cody Maloney" X-ReviewGroup: mesos X-ReviewRequest-URL: https://reviews.apache.org/r/35179/ X-Sender: "Cody Maloney" References: <20150609063458.27735.33869@reviews.apache.org> In-Reply-To: <20150609063458.27735.33869@reviews.apache.org> Reply-To: "Cody Maloney" X-ReviewRequest-Repository: mesos --===============6942103213030136926== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit > On June 9, 2015, 6:34 a.m., Cody Maloney wrote: > > 3rdparty/libprocess/3rdparty/stout/include/stout/path.hpp, line 58 > > > > > > I'm still against using enable_if here, it's a lot of extra complexity (And will be slightly greater compile time, as well as more complexity the compiler has to sort out for runtime). I don't see it providing great value over not using it. Hiding it behind a macro doesn't make it simpler. > > Anand Mazumdar wrote: > I removed the usage but is it fine with you if I keep require.hpp i.e. the macro intact ? It might benefit others who find the "std::enable_if" syntax too cumber-some ? ( I can see a couple of places in the code-base already where this can be used already ) > > Also, I did not quite understand your argument around "a lot of extra complexity". Did you mean syntaxtic complexity around std::enable_if ? ( That is what the macro was trying to achieve to make it as painless to use it. ) > > As for the compile-time complexity , I wouldn't think about it too much with the modern compilers et al. Just found a good presentation about the concepts in general: https://youtu.be/eR34r7HOU14?t=27m13s. At the very end of that presentation (Around 1 hour, 22 minutes in), Chandler talks in specific about doing stuff inside recursive variadic templates. More or less, the template ends up generating a mountain of code and function calls which is very hard to analyze as a compiler back end. - Cody ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/35179/#review87140 ----------------------------------------------------------- On June 9, 2015, 3:56 p.m., Anand Mazumdar wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/35179/ > ----------------------------------------------------------- > > (Updated June 9, 2015, 3:56 p.m.) > > > Review request for mesos, Adam B and Cody Maloney. > > > Bugs: MESOS-1733 > https://issues.apache.org/jira/browse/MESOS-1733 > > > Repository: mesos > > > Description > ------- > > This change takes an un-complicated/naive route ( no trimming of values etc ) at making path::join(...) variadic mainly in order to preserve the earlier over-loaded join functionality. > > Might have some C++ style issues owing to this being my first commit here. > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/stout/include/stout/path.hpp d4df6502d1297ea3ad8e2a1e3bb16ea9d7c7913c > > Diff: https://reviews.apache.org/r/35179/diff/ > > > Testing > ------- > > make check + added some additional tests. > > > Thanks, > > Anand Mazumdar > > --===============6942103213030136926==--