comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.tsoh+bauhaus@maps.futureapps.de>
Subject: Re: Containers - nontrivial element access
Date: Thu, 04 Oct 2007 15:01:53 +0200
Date: 2007-10-04T15:01:54+02:00	[thread overview]
Message-ID: <4704e442$0$30370$9b4e6d93@newsspool4.arcor-online.net> (raw)
In-Reply-To: <1191441598.702440.314410@22g2000hsm.googlegroups.com>

Maciej Sobczak wrote:

> Your solution requires some dose of liberal thinking, which I'm not
> easily willing to accept in the language that boasts high-integrity
> mindset. ;-)

To me, nesting procedures seems a still easier
to understand than having to understand what magic (yes!)
f(foo[x].bar, foo[y].bar) will do behind the scenes.

You saw that is was necessary to explain swap() in the first
place because it isn't obvious what it does, and how.
When I just see
   swap(foo[x].bar, foo[y].bar);
   copy(foo[x].bar, foo[y].bar);
will the names let me guess (correctly!) that the two functions
supposedly employ different mechanism and achieve
different effects, if so? BTW, the second line shows
how this isn't explicitly stating things at all: in which
direction would copy() be working?

You said that an Ada solution will pass things below the table
(nesting procedures yielding less immediate visibility (uplevel
references)). IMHO, swap(a[b].c, d[e].c) is passing
things under the carpet below the table.

Why not strive for something like

   swap_salary(c1, c2);
where
   c1, c2: Cursor;

As these all are implementation level thoughts, inviting
proper information hiding in place of hinting to mechanisms
in function names (swap), IMHO.



  parent reply	other threads:[~2007-10-04 13:01 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-01 21:55 Containers - nontrivial element access Maciej Sobczak
2007-10-01 23:52 ` Alex R. Mosteo
2007-10-02 16:40   ` Matthew Heaney
2007-10-02 23:16     ` Alex R. Mosteo
2007-10-02 20:47   ` Maciej Sobczak
2007-10-02 23:23     ` Alex R. Mosteo
2007-10-02  0:39 ` Jeffrey R. Carter
2007-10-02 16:44   ` Matthew Heaney
2007-10-03  0:20     ` Jeffrey R. Carter
2007-10-03 19:40       ` Maciej Sobczak
2007-10-03 19:56         ` Matthew Heaney
2007-10-03 20:21           ` Dmitry A. Kazakov
2007-10-03 22:37             ` Matthew Heaney
2007-10-04  8:06               ` Dmitry A. Kazakov
2007-10-03 22:02         ` Jeffrey R. Carter
2007-10-04  0:16         ` Robert A Duff
2007-10-07  8:41           ` Jacob Sparre Andersen
2007-10-11 19:15             ` Robert A Duff
2007-10-14  4:59               ` Jacob Sparre Andersen
2007-10-14  7:24                 ` Dmitry A. Kazakov
2007-10-14 13:49                   ` Georg Bauhaus
2007-10-14 15:07                     ` Dmitry A. Kazakov
2007-10-02 20:50   ` Maciej Sobczak
2007-10-03  0:22     ` Jeffrey R. Carter
2007-10-03  8:26       ` Dmitry A. Kazakov
2007-10-03 18:49         ` Jeffrey R. Carter
2007-10-03 19:09           ` Matthew Heaney
2007-10-03 19:15           ` Simon Wright
2007-10-03 19:48             ` Maciej Sobczak
2007-10-03 19:58             ` Matthew Heaney
2007-10-03 19:35           ` Dmitry A. Kazakov
2007-10-02  2:34 ` Randy Brukardt
2007-10-02 16:47   ` Matthew Heaney
2007-10-02  7:23 ` Dmitry A. Kazakov
2007-10-02 16:37 ` Matthew Heaney
2007-10-02 21:02   ` Maciej Sobczak
2007-10-02 22:20     ` Matthew Heaney
2007-10-03 19:59       ` Maciej Sobczak
2007-10-03 22:55         ` Matthew Heaney
2007-10-04  0:22         ` Robert A Duff
2007-10-04 13:01         ` Georg Bauhaus [this message]
2007-10-04 14:01           ` Matthew Heaney
2007-10-04 21:58           ` Matthew Heaney
replies disabled

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