www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/06/07/08:55:46

To: DJGPP AT SUN DOT SOE DOT CLARKSON DOT EDU
From: A DOT APPLEYARD AT fs1 DOT mt DOT umist DOT ac DOT uk
Date: 7 Jun 93 09:55:48 GMT
Subject: Gnu C addenda ideas ( ` as power op; @ as "whole of array"

I (A DOT APPLEYARD AT fs1 DOT mt DOT umist DOT ac DOT uk) wrote on 4 Jun 93 16:33:22 GMT
(Subject: comp.lang.c++ or equivalent thereof):-

  [(0) wanting information about who to send ideas re Gnu C/C++ language
additions to and how]
  (1) '`' as to-power-of (since in C 'x^y' means "x nonequivalence y" and
'x**y' means "x times quantity at address y"), at least with integer exponent,
as e.g. "sin(x) squared" if written as 'sin(x)`2' with an explicit power
operator can be easily optimized to "call sin, then multiply result register
by itself", but 'pow(sin(x),2)' inevitably compiles into a call of sin and
then a call of pow. This time saved can accumulate over long program runs.
  (2) If mytype is a type, and X is an array-of-mytype or pointer-to-mytype,
and K is an integer, 'K AT X' to mean "X[1] to X[K-1] inclusive" ...
  -----------------------------------------------------
  kuku AT acds DOT physik DOT rwth-aachen DOT de (Christoph Kukulies) replied to (2) on Sat 5
Jun 93 17:17:45 +0200:-
  > I think what you are suggesting can be achieved with some clever macros in
C as well. I don't think it wise to add features to C++; it's overburdened
with features anyway. (IMHO). BTW, are you programming in APL? --Chris
  -----------------------------------------------------
  Andrew Tucker <a_tucker AT paul DOT spu DOT edu> replied to (2) on Sat 5 Jun 1993
17:16:52 -0700 (PDT):-

  > Just overload the global operator=(), if you want to do this.
  -----------------------------------------------------
  Eric Backus <ericb AT lsid DOT hp DOT com> replied to (0) and (2) on Fri 4 Jun 93
13:46:48 PDT:-

 > I'm not a C++ person. However, you can't change the definition of C++ just
by asking the GNU people. C++ is mostly defined by its creator, Bjarne
Stroustroup. I believe that there is some ANSI committee which will eventually
standardize C++ the way ANSI C standardized C. Unless you get involved there,
there is no chance that your suggestions will make it to standard C++. Of
course, these ideas could still be implemented as GNU extensions. My guess
would be that GNU won't do it, though, unless you provide an implementation
for them. Eric Backus, ericb AT lsid DOT hp DOT com, (206) 335-2495
  Please what is the postal or email address of the abovementioned "ANSI
committee" and of Bjarne Stroustrup?, or how else can I get a message to them?
  -----------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019