From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Dispatch on the result still does not work?
Date: Sat, 11 Jul 2009 17:19:16 +0200
Date: 2009-07-11T17:19:10+02:00 [thread overview]
Message-ID: <7tu7wng4vxn6.nhbegffx941o$.dlg@40tude.net> (raw)
In-Reply-To: f4df2dac-81b6-4015-82a6-92926897071c@y17g2000yqn.googlegroups.com
On Sat, 11 Jul 2009 06:36:48 -0700 (PDT), Hibou57 (Yannick Duchêne) wrote:
> On 11 juil, 14:20, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
> wrote:
>> Conceptually there is no any difference between parameters and results of a
>> subprogram
>
> IMHO, there is a difference. A result is something created, not
> something assigned to.
>
> Until the function creates the return value, the return value does not
> exist.
(You mean here "the return object". The value has existed and continues to
exist. Value is a property of the type, e.g. 123 exists even if you don't
have any Integer variable holding it.)
> Now, what if the function is invoked for a formal parameter which is,
> let say “ Parameter : T'Class ” ?
The actual object is converted to T'Class (per view conversion). This is a
different case,... or not. All depends on how to treat the assignment
statement.
> Conceptually, returning a result from a function, is not an
> assignment, this is.... just returning a result from a function. If it
> later turns into an assignment, this is a matter of the usage of the
> function, not a matter of the work of the function. As a proof, this
> happens only later, after the function was invoked, and more than
> that, the result may not be assigned to any variable.
Well, I used to think the way like you do until Ada 2005 introduced limited
aggregates and initialization of limited objects and their components using
functions... (:-))
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2009-07-11 15:19 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-11 10:04 Dispatch on the result still does not work? Dmitry A. Kazakov
2009-07-11 11:09 ` Chris Moore
2009-07-11 12:05 ` Dmitry A. Kazakov
2009-07-11 17:50 ` Chris Moore
2009-07-11 19:22 ` Dmitry A. Kazakov
2009-07-11 11:32 ` Hibou57 (Yannick Duchêne)
2009-07-11 12:20 ` Dmitry A. Kazakov
2009-07-11 13:36 ` Hibou57 (Yannick Duchêne)
2009-07-11 13:39 ` Hibou57 (Yannick Duchêne)
2009-07-11 15:19 ` Dmitry A. Kazakov [this message]
2009-07-11 18:08 ` Hibou57 (Yannick Duchêne)
2009-07-11 19:29 ` Dmitry A. Kazakov
2009-07-11 23:22 ` Hibou57 (Yannick Duchêne)
2009-07-12 9:46 ` Dmitry A. Kazakov
2009-07-11 18:54 ` Georg Bauhaus
2009-07-11 19:40 ` Dmitry A. Kazakov
2009-07-12 10:40 ` Chris Moore
2009-07-12 11:30 ` Dmitry A. Kazakov
2009-07-12 16:05 ` Chris Moore
2009-07-12 16:38 ` Dmitry A. Kazakov
2009-07-12 17:11 ` AdaMagica
2009-07-12 20:30 ` sjw
2009-07-13 16:55 ` Adam Beneschan
2009-07-13 21:47 ` sjw
2009-07-13 22:50 ` Adam Beneschan
2009-07-14 21:06 ` sjw
2009-07-13 15:13 ` Adam Beneschan
2009-07-13 15:17 ` Adam Beneschan
2009-07-13 16:33 ` AdaMagica
2009-07-13 18:46 ` Adam Beneschan
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox