comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <bauhaus+rm.tsoh@maps.futureapps.de>
Subject: Re: SI Units - has Ada missed the boat?
Date: Mon, 23 Jul 2007 20:43:49 +0200
Date: 2007-07-23T20:44:05+02:00	[thread overview]
Message-ID: <1185216229.18184.19.camel@sonnenregen> (raw)
In-Reply-To: <1185168595.983271.43740@d55g2000hsg.googlegroups.com>

On Mon, 2007-07-23 at 05:29 +0000, kevin cline wrote:

> With three thousand years of practice writing mathematical
> expressions, symbolic operators are universally preferred over prosaic
> expressions.  Would you also claim that:

The problem I see is precisely that programming is, in
a sense, not exactly arithmetics. Of course, programming
has important mathematical descriptions, etc.. But there
is danger in considering them to be the same, and this
danger increases when the semantics of "+" is not known.

If programmers infer the semantics of "+" from math,
they are forgetting something: computers.

>   Let y = a times x times x plus b plus c
> 
> is just as easily grasped as:
> 
>   Let y = ax^2 + bx + c ?


Is this identifier "ax" to the power of 2?
This is not as absurd as it might seem. Math syntax,
used by mathematicians, is full of conventions and
highly dependent on context.
Programs also depend on context, e.g. the language
used, and the operator overloading visible. (Consider
# ax^2;;
This expression has type int but is here used with type string)

In fact, I think that many problems in programming
with number types have origins in the tempting
similarity of ASCII symbols for computer arithmetic
and mathematical expressions on paper.
Therefore, the local meaning of _overloaded_ operators
should at least be made explicit near the place where
they are use.





  reply	other threads:[~2007-07-23 18:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-08 15:13 SI Units - has Ada missed the boat? Martin
2007-07-10  5:54 ` ME
2007-07-18  7:11 ` kevin cline
2007-07-18  8:17   ` Georg Bauhaus
2007-07-23  5:29     ` kevin cline
2007-07-23 18:43       ` Georg Bauhaus [this message]
2007-07-24  9:59         ` Colin Paul Gloster
replies disabled

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