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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8d5151b6052512f7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-09 01:14:18 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!tar-meneldur.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: Overloading procedures with Float and Long_Float types Date: Tue, 09 Mar 2004 10:24:54 +0100 Message-ID: References: <404c7dbf.0@entanet> <404c9cae.0@entanet> NNTP-Posting-Host: tar-meneldur.cbb-automation.de (212.79.194.119) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1078823657 64974133 I 212.79.194.119 ([77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:6178 Date: 2004-03-09T10:24:54+01:00 List-Id: On Mon, 8 Mar 2004 16:17:42 -0000, "Luke Guest" wrote: >> > Translate calls an imported glTranslate[fd] procedure depending on the >> > parameter types. >> > >> Ah, you're calling a function with no return type which modifies a >> hidden matrix, in place -- not a very good software design, IMHO. > >Hang on. Do you know anything about OpenGL? The matrix is in hardware (or >software if the implementation is software) so, it's actually good design as >it abstracts out the matrix. I does not, because it cannot. The operation has a side effect on the graphic context, no matter whether it is a hardware or sofware one. This side effect is the only thing the operation actually does. So clearly, the context has to be exposed as a parameter. A good design would have the context (or a handle to it) as an in out parameter. Then a good design would also clarify all things concerning multiple contexts, concurrent access to a context etc. Further a good design would never use both float and double, provided that probably either both are same for the underlying hardware or one of them (float?) is extremely inefficient. -- Regards, Dmitry Kazakov www.dmitry-kazakov.de