🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Exponentiation operator proposal

#158
From: Robert I Ransbottom
Date: Sun, 13 Sep 1992 23:58
40 lines
2110 bytes
In article <1992Sep13.193507.27813@ima.isc.com> karl@ima.isc.com (Karl Heuer) writes:
>In article <23660@alice.att.com> bs@alice.att.com (Bjarne Stroustrup) writes:

>>Comments on Mat Austern's proposal for an exponentiation operator

>>[By defining `**' to have semantics of TIMES FETCH when the right operand

>I considered this when I wrote my exponentiation essay.  I decided that it
>might be possible, but it's way too confusing!  This would be a kludge of the
>highest order.  It's much better to use syntax that's not already taken --
>I've adopted "*^", as suggested by someone else some years ago.  (A hybrid of
>"**" and "^", sort of.)

I agree ** is confusing, given the potential frequency of both "dat**ptr" and
"dat**dat" it seems like a waste to deciphering such.  The proponents
of **expon want a convenience. 

I think that ^^ would be more satisfying to both pointer-ers and math-ers.  

    1. Its not already taken!
    2. Its not already taken!
    3. Its not already taken!
    .   .   .    .      .
    .   .   .    .      .
    n. Its easier to type than Karl's *^. 
    n+1. No more damaging if mistyped.
    n+2. The contexts of exponentiation and exclusive-or have less overlap
    	than multiplication & indirection and exponentiation.

My vote is behind a keyword like

	operator consistent { *=, /=, -=, += }

which would shorthand consistent derivatives  X= from X and =.
The longhand is simple enough to generate, but is more difficult to
read/verify given alien code.
-- 
rr@world.std.com  Robert Ransbottom

"Maintaining correct attributions is extremely important." -- anonymous
Technical Details
Message-ID: <BuJJxs.8Hx@world.std.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!sol.ctr.columbia.edu!eff!world!rr
References: <23660@alice.att.com> <1992Sep13.193507.27813@ima.isc.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c++,comp.lang.c++
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!sol.ctr.columbia.edu!eff!world!rr
From: rr@world.std.com (Robert I Ransbottom)
Subject: Re: Exponentiation operator proposal
Message-ID: <BuJJxs.8Hx@world.std.com>
Summary: ^^ better than ** or *^
Organization: The World Public Access UNIX, Brookline, MA
References: <23660@alice.att.com> <1992Sep13.193507.27813@ima.isc.com>
Date: Sun, 13 Sep 1992 23:58:39 GMT
Lines: 40