comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Access type to member procedure of instance (Object Oriented programming in Ada)
Date: Tue, 20 Nov 2012 11:12:24 +0100
Date: 2012-11-20T11:12:24+01:00	[thread overview]
Message-ID: <1ilx4ms9xk5h8.pz5jsnqrogye.dlg@40tude.net> (raw)
In-Reply-To: a128a093-db52-4c18-bfd7-a450b26ac00a@googlegroups.com

On Mon, 19 Nov 2012 14:19:46 -0800 (PST), Adam Beneschan wrote:

> On Monday, November 19, 2012 1:26:58 PM UTC-8, Dmitry A. Kazakov wrote:
>> On Mon, 19 Nov 2012 10:23:13 -0800 (PST), Adam Beneschan wrote:
>> 
>>> This doesn't look at all like what I'm talking about, since &Example::f
>>> still refers to a method defined for the class Example but without
>>> reference to a particular object.  Something equivalent would be if you
>>> could say &object.f (or maybe &object.*p) and store the result of that in
>>> a pointer that could be called later.
>> 
>> What would you do for:
>> 
>>    type T is tagged ...
>> 
>>    procedure Foo (X, Y, Z : T) ;
>> 
>> Would the closure carry three objects with it?
> 
> What I'm proposing is a way that one could say something like
> 
>    Object.Operation'access
> 
> In Ada, with regard to your procedure Foo, you can say
> 
>    X.Foo (Y, Z)
> 
> That's just the way the language is.

Two wrongs does not make one right.

>> If closures to be supported then they better be a bit more universal than 
>> just one tagged object + one operation.
> 
> Why?  Is there a rule that says that if a proposed change doesn't fix the
> entire world, then we shouldn't propose something that improves part of
> the world?

No idea. It is a great mystery to me what makes into the language and what
does not. Considering this one:

1. Why closures at all?

2. Why some arguments are more important than others, unless the programmer
specifies so?

3. Why closures must support only tagged types?

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



  reply	other threads:[~2012-11-20 10:11 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-19  9:59 Access type to member procedure of instance (Object Oriented programming in Ada) ake.ragnar.dahlgren
2012-11-19 11:13 ` Georg Bauhaus
2012-11-19 11:39 ` Brian Drummond
2012-11-20 11:43   ` Brian Drummond
2012-11-20 21:57     ` Randy Brukardt
2012-11-19 13:03 ` sbelmont700
2012-11-19 16:18 ` Adam Beneschan
2012-11-19 17:02   ` Peter C. Chapin
2012-11-19 18:23     ` Adam Beneschan
2012-11-19 20:57       ` Peter C. Chapin
2012-11-19 21:26       ` Dmitry A. Kazakov
2012-11-19 22:19         ` Adam Beneschan
2012-11-20 10:12           ` Dmitry A. Kazakov [this message]
2012-11-20 21:51             ` Randy Brukardt
2012-11-21  8:24               ` Dmitry A. Kazakov
2012-11-21 22:19                 ` Randy Brukardt
2012-11-20 10:59     ` Brian Drummond
2012-11-19 20:22 ` ake.ragnar.dahlgren
2012-11-20 11:16   ` Brian Drummond
2012-11-19 20:52 ` ake.ragnar.dahlgren
2012-11-19 21:56   ` Dmitry A. Kazakov
2012-11-22  9:49     ` ake.ragnar.dahlgren
2012-11-19 22:13   ` sbelmont700
2012-11-19 23:59 ` Randy Brukardt
2012-11-20  0:05   ` Randy Brukardt
2012-11-20  1:00     ` Adam Beneschan
2012-11-20 21:38       ` Randy Brukardt
2012-11-20 23:43         ` Adam Beneschan
2012-11-21 22:12           ` Randy Brukardt
2012-11-22  1:59             ` Adam Beneschan
2012-11-29  2:43               ` Randy Brukardt
2012-11-20  0:52   ` Adam Beneschan
2012-11-20 21:34     ` Randy Brukardt
2012-11-20 11:28   ` Brian Drummond
2012-11-20 14:27     ` Georg Bauhaus
2012-11-20 15:52     ` Adam Beneschan
2012-11-22  9:47 ` ake.ragnar.dahlgren
2012-11-22 10:25   ` Dmitry A. Kazakov
2012-12-02 20:42     ` ake.ragnar.dahlgren
2012-12-03 11:21       ` Dmitry A. Kazakov
2012-12-03 20:21         ` ake.ragnar.dahlgren
2012-12-03 22:15           ` Dmitry A. Kazakov
2012-12-25 21:51           ` Gustaf Thorslund
2012-12-26 18:11             ` ake.ragnar.dahlgren
2012-11-22 12:13   ` Brian Drummond
2012-12-03 16:17     ` ake.ragnar.dahlgren
2012-12-03 21:56       ` Brian Drummond
replies disabled

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