220 41360 <a4ed51d9-36ac-462f-aafa-06478682140a@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: joel.g.hemphill@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Optimizing Power Function for Integral Types
Date: Fri, 18 Jan 2019 17:19:17 -0800 (PST)
Lines: 78
Approved: news@gmane.org
Message-ID: <a4ed51d9-36ac-462f-aafa-06478682140a@isocpp.org>
References: <fbfec82c-5416-4c96-b53b-ef3d4309b613@isocpp.org>
 <c5128f98-b764-4576-90fc-eda8d40d980e@isocpp.org>
 <e9d08680-2afe-45b3-a95c-ac9ddc2ef386@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_1174_980906168.1547860757552"
X-Trace: blaine.gmane.org 1547860637 24961 195.159.176.226 (19 Jan 2019 01:17:17 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 19 Jan 2019 01:17:17 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC4Y55PCR4BBBFXWRHRAKGQEKZLKT2I@isocpp.org Sat Jan 19 02:17:13 2019
Return-path: <std-proposals+bncBC4Y55PCR4BBBFXWRHRAKGQEKZLKT2I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw1-f71.google.com ([209.85.161.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBC4Y55PCR4BBBFXWRHRAKGQEKZLKT2I@isocpp.org>)
	id 1gkfG1-0006Jm-CD
	for gclcip-std-proposals@m.gmane.org; Sat, 19 Jan 2019 02:17:09 +0100
Original-Received: by mail-yw1-f71.google.com with SMTP id f10sf7896394ywc.21
        for <gclcip-std-proposals@m.gmane.org>; Fri, 18 Jan 2019 17:19:21 -0800 (PST)
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=UbyuwawlXjBoZGzshQ92OjMLLRIByNT7OeYpm7zc6Lw=;
        b=jUj4MczxqG1sT/uJ4QDOxxdD1hadnoqbyk9WCM2S0w97xoHault/oX/ltiarKDzyYX
         RscSAgxYq3eYbP8oOJgaYQXV/X8qqMNdEmZkxZR5aluObctjZJl/knO0zM/XbfXljFwv
         nZgSKzFBcDO9Fgtkt71VnqJxgbLVwARpY1M6gTGL4MkcR6o5DBJxrV+AaHrlFfavzFhi
         i/tA7QdYM2uqwUURDOfpbzH3OA+NYISNQt0wgGXC8FD3vKNfEDyMWrFoMWMjVurnkmUP
         FYcYBQWaYK3AtBVJc3RQpoJAlxN5IHdN/VodsMNmtBzKUok5mB01x1rhLQ528wJI/lO1
         3C8A==
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=UbyuwawlXjBoZGzshQ92OjMLLRIByNT7OeYpm7zc6Lw=;
        b=MBlKxmkC8o2RdnnkjgnVfc8fYI029KeitC5xafKJKJYNX5fRkcmLJU89o8ZB8xDmNE
         mpxzJ0T7M5envzzDnHIcoqYvUliH6ru6RwO8VwL7JUIkh3D9Ne6FzIQ88MRpoyYDcRjd
         mc9iNdCekC5KZjA8BhsA4WflpFXWMTCSveUjU7RfQ+v7ZJvVE5cJKN2HPytheWDK7KPc
         l7IRVL+YrM05GSSbGS3/H/nBeJ7wYrHgQ4ctK69gDKrYJ1oB1Vhvga6/WtiOcOwz5zTY
         6zM5FCKCJa5NQdfxFshBy53wLtrOTemz4W7I6NFbsLJOX7jJ1aE6cPX3xSmmSG0FYhu/
         DRKQ==
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=UbyuwawlXjBoZGzshQ92OjMLLRIByNT7OeYpm7zc6Lw=;
        b=dGm2BTsgAzBh6HwLv1QzvnDPQI2+LgugTobcxLyoiOzPCV/sxe+GxLPRW74dTz19G+
         N/4s7AvkfWfc4hGAy3OA3NOOVTKCMrM762xJfB8EaT5uccAyyAngL/dY6DrlBhjS0SFv
         uLQi1ooSuWTAFmt0GIs6kB9JdAk++ivqrsKUqdCvJ7RcDKGKQXsGkZ5vQX4w6ZmL+Xue
         wUnpl+JENlMAB7xdeyw2v+X4+r1ww8mW4rtCAKN99E5hRoV5myJvG4lgJ4o9hyWb1jh8
         y2re5SED421wA9d8LkXc6WKHB118GieIrhRhdPrt13ePJYtUZkm3Ng8dESL699sDMvlJ
         t+uQ==
X-Gm-Message-State: AJcUukf1Z1JESIz855VND7KhuzT02defJwEVRr3b4VjuLTW+r9ap5QlI
	VvosE5cdxThyQjb7GqHwo/YZ1Q==
X-Google-Smtp-Source: ALg8bN7vsmdFt6OUIXHsH5HYOP3GgLZ+K5g2GoEAGR3ZUN17gfhfJHyr00lEbmfSXNe3CJz3cdsPVA==
X-Received: by 2002:a25:99c2:: with SMTP id q2mr4797686ybo.40.1547860759389;
        Fri, 18 Jan 2019 17:19:19 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a81:3084:: with SMTP id w126ls365389yww.4.gmail; Fri, 18 Jan
 2019 17:19:18 -0800 (PST)
X-Received: by 2002:a81:115:: with SMTP id 21mr216548ywb.7.1547860758302;
        Fri, 18 Jan 2019 17:19:18 -0800 (PST)
In-Reply-To: <e9d08680-2afe-45b3-a95c-ac9ddc2ef386@isocpp.org>
X-Original-Sender: Joel.G.Hemphill@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: 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:41360
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/41360>

------=_Part_1174_980906168.1547860757552
Content-Type: multipart/alternative; 
	boundary="----=_Part_1175_950262710.1547860757553"

------=_Part_1175_950262710.1547860757553
Content-Type: text/plain; charset="UTF-8"

I think the idea of un-abbreviating pow would be a nice design shift, 
though I am skeptical due to the amount of code which would be made 
'legacy' by such a change. As for the operators... Those would need to be 
introduced at the core-language level, and I don't think that it would be 
an appropriate proposal here. As a side note here; I DO think it would be 
an interesting shift in the core language to support user-defined 
operators. It would be very difficult to define a consistent methodology, 
but it would significantly improve the general readability of a good number 
of object-interactions. For instance: operator::@(MyPointClass c)". Like I 
said though, this really isn't the place for such ideas, as those would 
need to happen at the lower-levels of C++.

On Friday, January 18, 2019 at 3:42:19 PM UTC-8, Jake Arkinstall wrote:
>
> I agree on that - but I also dislike like the unnecessary abbreviation 
> "pow", so I'd propose a templated function std::power, maybe with a default 
> for unsigned integral powers if T operator*(T const&, T const&) exists.
>
> Even better, an operator for it instead (e.g. ^^, as ** introduces 
> ambiguities).
>

-- 
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/a4ed51d9-36ac-462f-aafa-06478682140a%40isocpp.org.

------=_Part_1175_950262710.1547860757553
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I think the idea of un-abbreviating pow would be a nice de=
sign shift, though I am skeptical due to the amount of code which would be =
made &#39;legacy&#39; by such a change. As for the operators... Those would=
 need to be introduced at the core-language level, and I don&#39;t think th=
at it would be an appropriate proposal here. As a side note here; I DO thin=
k it would be an interesting shift in the core language to support user-def=
ined operators. It would be very difficult to define a consistent methodolo=
gy, but it would significantly improve the general readability of a good nu=
mber of object-interactions. For instance: operator::@(MyPointClass c)&quot=
;. Like I said though, this really isn&#39;t the place for such ideas, as t=
hose would need to happen at the lower-levels of C++.<br><br>On Friday, Jan=
uary 18, 2019 at 3:42:19 PM UTC-8, Jake Arkinstall wrote:<blockquote class=
=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #cc=
c solid;padding-left: 1ex;">I agree on that - but I also dislike like the u=
nnecessary abbreviation &quot;pow&quot;, so I&#39;d propose a templated fun=
ction std::power, maybe with a default for unsigned integral powers if T op=
erator*(T const&amp;, T const&amp;) exists.<p>Even better, an operator for =
it instead (e.g. ^^, as ** introduces ambiguities).</p></blockquote></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/a4ed51d9-36ac-462f-aafa-06478682140a%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/a4ed51d9-36ac-462f-aafa-06478682140a=
%40isocpp.org</a>.<br />

------=_Part_1175_950262710.1547860757553--

------=_Part_1174_980906168.1547860757552--

.
