🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #705

Re: Exponentiation operator proposal

#705
From: Jim Adcock
Date: Wed, 14 Oct 1992 22:57
10 lines
1076 bytes
In article <23663@alice.att.com> bs@alice.att.com (Bjarne Stroustrup) writes:
>How frequent is a**p anyway? (has anyone got any data?) How confusing...

I just ran a quick measurement on a convenient sample of 85,000 lines of
C and C++ code.  Based on this sample "**" appears on average about once
per every 200 lines of code.  This is a pretty high occurance.  For comparison
"^" [XOR] appears on average once per 3000 lines of code!  Based on this
measure I'd much rather see "^^" used for exponentiation, since the potential
for confusion would seem to be much much lower.  Too bad "^" was misused to
mean XOR in the first place or the problem would be solved!
Technical Details
Message-ID: <1992Oct14.225725.16486@microsoft.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!microsoft!hexnut!jimad
References: <1992Sep13.193507.27813@ima.isc.com> <BuJJxs.8Hx@world.std.com> <23663@alice.att.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c++,comp.lang.c++
Path: arc1-ca.pugleaf.net!sparky!uunet!microsoft!hexnut!jimad
From: jimad@microsoft.com (Jim Adcock)
Subject: Re: Exponentiation operator proposal
Message-ID: <1992Oct14.225725.16486@microsoft.com>
Date: 14 Oct 92 22:57:25 GMT
Organization: Microsoft Corporation
References: <1992Sep13.193507.27813@ima.isc.com> <BuJJxs.8Hx@world.std.com> <23663@alice.att.com>
Lines: 11