comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada & Postgresql
Date: Mon, 6 Sep 2004 15:19:07 +0200
Date: 2004-09-06T15:19:07+02:00	[thread overview]
Message-ID: <1mmlrlgicrdv2$.17qzqqt88m9lx$.dlg@40tude.net> (raw)
In-Reply-To: mailman.45.1094474634.31213.comp.lang.ada@ada-france.org

On Mon, 06 Sep 2004 13:43:56 +0100, Marius Amado Alves wrote:

>> ...I can't pinpoint now what annoying Ada 95 feature 
>> I was escaping back in 2001 when I wrote this package and its 
>> applications. Never mind. Just write Pgsql_Controlled.
> 
> OK, I just took the time to write this. While I'm at it, I'll control 
> also Db_Type, to call Close on finalization. Oops, no, Ada 95 does not 
> let me do that, it makes
> 
>     function Execute (Db: Db_Type; Command: String) return Result_Type;
> 
> illegal, because an "operation can be dispatching in only one type."

Well, Ada does not have multiple dispatch...

> This is one of many examples of what I call "Ada getting in the way."

But very probably it is not what you actually need. I suppose that the
Result_Type'Class hierarchy (if any) is independent to one of
Db_Type'Class. So the Execute could be contravariant in its result:

function Execute (Db: Db_Type; Command: String)
   return Result_Type'Class;

-- 
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



  parent reply	other threads:[~2004-09-06 13:19 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-03 17:09 Ada & Postgresql Alex R. Mosteo
2004-09-03 20:51 ` Adrian Knoth
2004-09-04 11:41   ` Marius Amado Alves
2004-09-04 13:50 ` Pascal Obry
2004-09-06  8:42   ` Alex R. Mosteo
2004-09-06  9:13     ` Alex R. Mosteo
2004-09-06  9:44       ` Marius Amado Alves
2004-09-06 10:10         ` Alex R. Mosteo
2004-09-06 10:57           ` Marius Amado Alves
2004-09-06 11:37             ` Alex R. Mosteo
2004-09-06 11:54               ` Marius Amado Alves
     [not found]               ` <413C4FFE.1010105@netcabo.pt>
2004-09-06 12:03                 ` Marius Amado Alves
2004-09-06 12:43                 ` Marius Amado Alves
2004-09-06 12:54                   ` Martin Dowie
2004-09-06 13:17                     ` Marius Amado Alves
2004-09-06 13:19                   ` Dmitry A. Kazakov [this message]
2004-09-06 14:33                     ` Marius Amado Alves
2004-09-06 18:00                       ` Dmitry A. Kazakov
2004-09-06 15:18                   ` Jean-Marc Bourguet
2004-09-06 11:36           ` Marius Amado Alves
2004-09-06 12:56             ` Alex R. Mosteo
2004-09-06 13:12               ` Marius Amado Alves
2004-09-06 15:20                 ` Björn Persson
     [not found]       ` <413C318E.9050709@netcabo.pt>
2004-09-06 10:00         ` Marius Amado Alves
2004-09-06 10:27           ` Alex R. Mosteo
2004-09-06 11:34     ` Dmitry A. Kazakov
2004-09-07  7:02     ` Jerry van Dijk
2004-09-07  8:31       ` Alex R. Mosteo
2004-09-06 15:36 ` Wojtek Narczynski
2004-09-17  1:42   ` Warren W. Gay VE3WWG
2004-09-25 15:26     ` Michael Erdmann
2004-09-25 19:03       ` Pascal Obry
2004-09-29 20:56         ` Warren W. Gay VE3WWG
2004-09-29 21:11           ` Ludovic Brenta
2004-09-30  9:56           ` Benjamin Ketcham
2004-10-04 16:09             ` Warren W. Gay VE3WWG
replies disabled

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