comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Self pointer in limited record
Date: Thu, 6 Sep 2007 11:28:58 +0200
Date: 2007-09-06T11:28:27+02:00	[thread overview]
Message-ID: <s83ac6ut9dtk.qnwcsztn6wul$.dlg@40tude.net> (raw)
In-Reply-To: 0n9obf.tgd.ln@hunter.axlog.fr

On Thu, 06 Sep 2007 09:19:54 +0200, Jean-Pierre Rosen wrote:

> Dmitry A. Kazakov a �crit :
>>> 2 certainly can. The idea is that you cannot put "Spike the dog" into 
>>> your computer; what you can do is put some characteristics of it in the 
>>> form of data that are of interest from the point of view of your 
>>> program. You therefore abstract away all the uninteresting properties.
>> 
>> Yes, but my point is that these characteristics would have qualitative or
>> quantitative values from some sets. For example weight. Can I change it?
>> Would it be Spike? If yes, then what does the weight characterize? 
> Of course, if I feed Spike too much, its weight will change - and it is 
> still Spike. I don't see the problem here.

You don't need to model Spike's weight in your system because changing the
weight should have no effect. Spike cannot communicate its weight to other
components of the system, because it is not *a* thing with mass. No, it is
just Spike, the One. Its weight has been abstracted away.

>> If not,
>> where is Spike? As long as I can construct (not Spike), it is not unique.

> But if, *for my problem*, I am interested only in Spike, (not Spike) 
> makes no sense.

It might make no [immediate] use, but it does sense in the context of your
abstract model. Some properties of Spike cannot be abstracted away even if
they might happen to be constant/uninteresting. So your model is capable to
deal with objects of different weight. It would certain generalization
power. This can be used in order to verify consistency or ease
implementation.

Weight is a number with all properties of real values + ones of mass,
acceleration etc. But Spike's weight (tm) is not a number. It is another
singleton specific to Spike and unrelated to anything else = nothing.

> I'm not arguing that there cannot be a class of dogs, 
> but that if in my problem domain I am interested in the properties of a 
> single object, I can represent that single object in a computer, and 
> that the representation of this single object, because it omits all the 
> details that are not relevant to my problem, is an *abstraction*.

That's OK. I don't argue that there shall be multiple instances. However
this too might potentially be quite useful in order to allow the compiler
to pass Spike by value, to put it in a register or cache, to marshal over
the network. Why should I care? In most [not all] cases I need not.

Then to me, property/attribute/characteristic = a primitive operation
yielding a value of some [other] type. How something without a type can
have a primitive operation in a typed language like Ada?

>>> How could you have something in the model that is not in what you are 
>>> modelling?
>> 
>> I can add some properties to make implementation simpler or possible. 
> Ha! You said "implementation". To me, that's the concrete view. The 
> abstract view is there to hide implementation details.

I meant implementation in a broader sense than "private constructs." Public
declarations is an implementation too. Maybe, "realization" or "spelling"
would be better.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2007-09-06  9:28 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-04 19:31 Self pointer in limited record Maciej Sobczak
2007-07-05  8:22 ` Dmitry A. Kazakov
2007-07-05 10:35   ` Maciej Sobczak
2007-07-05 11:01     ` Pascal Obry
2007-07-05 11:14     ` Georg Bauhaus
2007-07-05 12:36     ` Dmitry A. Kazakov
2007-08-31 16:47 ` amado.alves
2007-08-31 17:09   ` Pascal Obry
2007-08-31 17:37   ` Adam Beneschan
2007-08-31 18:26   ` Jeffrey R. Carter
2007-08-31 19:33   ` Dmitry A. Kazakov
2007-09-01 13:33     ` Georg Bauhaus
2007-09-01 13:46       ` Dmitry A. Kazakov
2007-09-01 14:15         ` Georg Bauhaus
2007-09-01 16:03           ` Dmitry A. Kazakov
2007-09-01 19:49             ` Georg Bauhaus
2007-09-01 20:09               ` Dmitry A. Kazakov
2007-09-02 21:37                 ` Georg Bauhaus
     [not found]                   ` <re7ei5lc7dzf$.11qtcnh35jmzg$.dlg@40tude.net>
2007-09-03 10:51                     ` Georg Bauhaus
2007-09-03 14:17                       ` Dmitry A. Kazakov
2007-09-03 15:55                         ` Jean-Pierre Rosen
2007-09-03 19:17                           ` Dmitry A. Kazakov
2007-09-03 19:32                             ` Markus E L
2007-09-03 20:14                             ` Georg Bauhaus
2007-09-04  8:24                               ` Dmitry A. Kazakov
2007-09-04  9:36                                 ` Jean-Pierre Rosen
2007-09-04 10:14                                   ` Dmitry A. Kazakov
2007-09-05 10:49                                 ` Georg Bauhaus
2007-09-05 12:04                                   ` Dmitry A. Kazakov
2007-09-05 13:12                                     ` Jean-Pierre Rosen
2007-09-05 15:10                                       ` Dmitry A. Kazakov
2007-09-05 16:25                                         ` Jean-Pierre Rosen
2007-09-05 19:52                                           ` Dmitry A. Kazakov
2007-09-06  7:19                                             ` Jean-Pierre Rosen
2007-09-06  9:28                                               ` Dmitry A. Kazakov [this message]
2007-09-06 11:53                                                 ` Jean-Pierre Rosen
2007-09-06 15:35                                                   ` Dmitry A. Kazakov
2007-09-05 18:31                                     ` Georg Bauhaus
2007-09-05 19:52                                       ` Dmitry A. Kazakov
2007-09-05 21:38                                         ` Georg Bauhaus
2007-09-06  7:37                                           ` Dmitry A. Kazakov
2007-09-06 10:26                                             ` Georg Bauhaus
2007-09-06 12:25                                               ` Dmitry A. Kazakov
2007-09-08  1:27                                               ` Randy Brukardt
2007-09-06  9:14                                         ` Markus E L
2007-09-06  9:48                                           ` Dmitry A. Kazakov
2007-09-04  8:23                             ` Jean-Pierre Rosen
2007-10-31 23:59                           ` adaworks
2007-09-03 20:38                         ` Georg Bauhaus
2007-09-04  8:24                           ` Dmitry A. Kazakov
2007-09-03  7:54             ` Jean-Pierre Rosen
2007-09-01 15:33         ` Markus E L
2007-09-04 14:55           ` Adam Beneschan
2007-09-04 15:09             ` Jean-Pierre Rosen
2007-09-08  1:36               ` Randy Brukardt
2007-09-04 17:31             ` Georg Bauhaus
2007-09-08  1:16     ` Randy Brukardt
2007-09-10 16:27       ` amado.alves
2007-09-10 17:13         ` Adam Beneschan
2007-09-10 19:00         ` Dmitry A. Kazakov
2007-09-11  3:12           ` Randy Brukardt
2007-09-11  9:38             ` Dmitry A. Kazakov
2007-09-12 21:57               ` Randy Brukardt
2007-09-13  8:03                 ` Dmitry A. Kazakov
2007-09-13 21:37                   ` Randy Brukardt
replies disabled

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