From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2efc07c562a92932 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada & Postgresql Date: Mon, 6 Sep 2004 15:19:07 +0200 Organization: cbb-software GmbH Message-ID: <1mmlrlgicrdv2$.17qzqqt88m9lx$.dlg@40tude.net> References: <2prmojFo9eo1U1@uni-berlin.de> <2q2m4sFqobhgU1@uni-berlin.de> <2q2nvhFq4qqdU1@uni-berlin.de> <2q2r9tFqihj7U1@uni-berlin.de> <2q30d9Fr1gbmU1@uni-berlin.de> <413C4FFE.1010105@netcabo.pt> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de h0v7YcYSteLZmW7MTLnLBAxYmYxEq/Tf8j/SaXaHOGYpHzwSQ= User-Agent: 40tude_Dialog/2.0.12.1 Xref: g2news1.google.com comp.lang.ada:3379 Date: 2004-09-06T15:19:07+02:00 List-Id: 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