comp.lang.ada
 help / color / mirror / Atom feed
From: kilgallen@eisner.decus.org (Larry Kilgallen, LJK Software)
Subject: Re: Ada self-referential operators
Date: 25 Feb 95 08:28:13 -0500
Date: 1995-02-25T08:28:13-05:00	[thread overview]
Message-ID: <1995Feb25.082813.9224@eisner> (raw)
In-Reply-To: 3id9qi$a7m@usenet.srv.cis.pitt.edu

In article <3id9qi$a7m@usenet.srv.cis.pitt.edu>, sparre+@pitt.edu (Jacob S. Andersen) writes:

> A really useful feature (for math) in a programming language would be the
> ability to explain algebraic relations (is this the right words?). Something
> like:
>
>     operator Complex "*" Complex precedes Complex "+" Complex ;
>     operator Complex "-" Complex equivalent with Complex "+" Complex ;
>     operator "-" Complex precedes Complex "*" Complex ;
>
>     relation Complex.Left "*" Complex.Right equivalent with
>              Complex.Right "*" Complex.Left ;
>     relation Complex.Left "+" Complex.Right equivalent with
>              Complex.Right "+" Complex.Left ;
>     relation Complex.Left "-" Complex.Right equivalent with
>              Complex.Left "+" ( "-" Complex.Right ) ;

I don't know math, but I do know software maintenance, and I think
this would be a perfectly horrible addition to Ada.  (I don't mind
if you make the change to C.)

I suppose flexible precedence declarations would be ok so long as
they could only be used on symbols which are _not_ in the standard
precedence scheme for the language.

> I think it might help optimizing the code, but I'm not sure.

For write-only source code, I supposed it might make the source
shorter, but readability is paramount in a program which is to
be dealt with on two or more days.

For "optimizing" machine instructions, there are lots of things
which can be done with the innards of compilers, independent of
the exact syntax of source language.  Some of them, of course,
fare better with a high level language like Ada, and nothing
you propose would affect high quality optimizers one way or the
other.

I don't mean to be hostile to research mathematicians, but I
presume the reason you brought it up for discussion is to get
the perspective of others.

Larry Kilgallen
Using Ada since 1988 without a government mandate



  parent reply	other threads:[~1995-02-25 13:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-02-01  9:34 Ada self-referential operators R.A.L Williams
     [not found] ` <3hnoe6$1aoi@info4.rus.uni-stuttgart.de>
     [not found] ` <3grqrf$jkd@gnat.cs.nyu.edu>
1995-02-06 20:51   ` Kenneth Almquist
1995-02-08  2:06     ` John Volan
1995-02-08  6:45       ` Jay Martin
1995-02-08  9:04       ` Brian Rogoff
1995-02-08 20:13         ` John DiCamillo
1995-02-09 23:52           ` David Weller
1995-02-10  6:48         ` pang
1995-02-10 16:15           ` Robert I. Eachus
1995-02-09 17:30       ` Norman H. Cohen
1995-02-11 13:56         ` Robert Dewar
     [not found]   ` <3id9qi$a7m@usenet.srv.cis.pitt.edu>
1995-02-25 13:28     ` Larry Kilgallen, LJK Software [this message]
1995-03-08 23:26     ` Val Kartchner
  -- strict thread matches above, loose matches on Subject: below --
1995-02-10 17:07 R.A.L Williams
1995-02-11  5:34 ` Keith Thompson
     [not found] <3id0oo$e64@gnat.cs.nyu.edu>
1995-02-23 17:45 ` Brian Hanson
1995-03-01 18:41   ` Thomas G. Coles (1W0)
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox