comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.tsoh+bauhaus@maps.futureapps.de>
Subject: Re: Unary operator after binary operator: legal or not? => Compiler Error
Date: Wed, 01 Aug 2007 11:34:52 +0200
Date: 2007-08-01T11:34:11+02:00	[thread overview]
Message-ID: <1185960892.30576.63.camel@kartoffel> (raw)
In-Reply-To: <2gmn4oyk4bfc$.1hnlf2lncqe1$.dlg@40tude.net>

On Wed, 2007-08-01 at 10:02 +0200, Dmitry A. Kazakov wrote:
> On Wed, 01 Aug 2007 09:24:33 +0200, Georg Bauhaus wrote:
> 
> > Or perhaps Robert Dewar's suggestion to reserve one punctuation
> > symbol not currently in the language for user defined operator
> > overloading might help, like "$"? Or, since $ is used in some
> > preprocessors, one symbol that is wisely picked from the set
> > of symbols available in ISO 10646. Just one.
> 
> Huh, Georg, you were so happy about Unicode. Now you miss such an excellent
> opportunity to use the "advantages" of! There are whole lotta code
> positions to grab. I vote for "voiceless central-plus-lateral alveolar
> fricative" (U+02AA) for that purpose.

A better choice might be something neutral,

- A symbol that stands out and is easier to distinguish
  from other characters than ASCII '0' is from 'O'.

- is not a currency symbol.

- In a pinch, can be produced by a 9pin needle printer,
  and be distinguishable.

- A symbol that is not mistaken for a display problem.

- Also, it should be readily available on most contemporary
  workstations, terminals, or PCs. 

- Other important qualities might be the amount of symmetry,

- a lack of conventional meaning to avoid presumptions.

- Perhaps the operator symbol should also be free from potential
  political issues deriving from symbolic associations.

- The glyphs should have reasonably few "relatives" (we can
  live with 0 and O, 1 and l, so no silly pseudo-arguments
  about glyphs of character sets, please)

- It will need to be stressed that everything that looks new will
  create well known reactions in stereotypical machine
  programmers just like in the stereotypical peasants. Both are
  always skeptical of the unknown almost by definition (Useless!
  Have been working without it for generations! -- Well, why Ada
  then, why generics, and why O-O? ;-)

Examples:

"◆"	Black Diamond
"⚫"	Medium black circle
"⊡"	Squared dot operator
"⊚"	Circled ring operator

Note that none of these have been chosen from the set of
widely used mathematical symbols. (Of course, someone _is_
using these symbols, would they exist otherwise.)
A few example uses:

  X := Y ◆ 4;

  X := ◆"Allô !";

Black, bold, standing out, simple.
(Unlike a white diamond, a black diamond does not look like
anything else, even with reduced eye sight: In X := Y ◇ 4;
the white diamond maybe does look like some other character.)

  X := Y ⚫ 4;

  X := ⚫"Allô !";

Similar.
Needless to say, we already have '0' and 'O' and 'o' in
Ada 83, so please avoid adding another white, empty circle.
Instead, use two:

  X := Y ◎ 4;

  X := ◎"Allô !";

I prefer squares over circles because squares don't look like
any other symbol of Ada (Ada does not have '[' and ']' brackets,
so misunderstandings are unlikely):

  X := Y ⊡ 4;

  X := ⊡"Allô !";

Here is a counterexample that in my view doesn't seem to work well
on all computers: "⌘", the Place of interest sign. It might
be displayed like a blurred 'x' or like a blurred multiplication
symbol.






  parent reply	other threads:[~2007-08-01  9:34 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-30 22:52 Unary operator after binary operator: legal or not? Jeffrey R. Carter
2007-07-30 23:39 ` Markus E.L.
2007-07-31  0:22 ` Adam Beneschan
2007-07-31 21:52   ` Jeffrey R. Carter
2007-07-31  8:01 ` anon
2007-07-31  8:16   ` Unary operator after binary operator: legal or not? => Compiler Error anon
2007-07-31  8:38     ` AW: Unary operator after binary operator: legal or not? => CompilerError Grein, Christoph (Fa. ESG)
2007-07-31 15:05     ` Unary operator after binary operator: legal or not? => Compiler Error Robert A Duff
2007-07-31 15:39       ` Dmitry A. Kazakov
2007-07-31 15:53         ` Robert A Duff
2007-07-31 17:02           ` Georg Bauhaus
2007-07-31 19:17             ` Adam Beneschan
2007-08-01  7:16               ` Maciej Sobczak
2007-08-01 15:23                 ` Adam Beneschan
2007-07-31 20:59             ` Robert A Duff
2007-08-01  7:24               ` Georg Bauhaus
2007-08-01  8:02                 ` Dmitry A. Kazakov
2007-08-01  8:17                   ` AW: Unary operator after binary operator: legal or not? => CompilerError Grein, Christoph (Fa. ESG)
2007-08-01 10:10                     ` Ian Clifton
2007-08-01  9:34                   ` Georg Bauhaus [this message]
2007-08-01 21:51                 ` Unary operator after binary operator: legal or not? => Compiler Error Jeffrey R. Carter
2007-07-31 17:52           ` Dmitry A. Kazakov
2007-08-02 20:44           ` Charles Lindsey
2007-08-03  7:48             ` Stuart
2007-08-03  7:51             ` Dmitry A. Kazakov
2007-07-31 23:22     ` anon
2007-08-01  0:13       ` Adam Beneschan
2007-08-01  6:20         ` Unary operator after binary operator: legal or not? => Illegal anon
2007-08-01  5:34       ` AW: Unary operator after binary operator: legal or not? => CompilerError Grein, Christoph (Fa. ESG)
2007-08-01  6:46         ` To := Grein, Christoph (Fa. ESG) anon
2007-08-01  7:11           ` AW: " Grein, Christoph (Fa. ESG)
2007-08-02  6:52             ` anon
2007-08-02  8:56               ` AW: " Grein, Christoph (Fa. ESG)
2007-08-02 22:29                 ` Markus E.L. 2
2007-08-02 23:02                   ` tmoran
2007-08-02 23:11                     ` Ed Falis
2007-08-02 23:34                     ` Markus E.L. 2
2007-08-03  4:42                   ` AW: " Grein, Christoph (Fa. ESG)
2007-08-02 22:28               ` Markus E.L. 2
replies disabled

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