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-08 07:10:50 PST From: "Luke Guest" Newsgroups: comp.lang.ada References: <404c7e53.0@entanet> Subject: Re: Overloading procedures with Float and Long_Float types Date: Mon, 8 Mar 2004 15:10:36 -0000 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 195.74.122.227 Message-ID: <404c8da0.0@entanet> X-Trace: 8 Mar 2004 15:13:36 GMT, 195.74.122.227 Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!c03.atl99!news.usenetserver.com!newsfeed.yul.equant.net!newsfeed.uk.prserv.net!prserv.net!news.freedom2surf.net!entanet!195.74.122.227 Xref: archiver1.google.com comp.lang.ada:6144 Date: 2004-03-08T15:10:36+00:00 List-Id: "Preben Randhol" wrote in message news:slrnc4ovhc.2eu.randhol+valid_for_reply_from_news@k-083152.nt.ntnu.no... > On 2004-03-08, Luke Guest wrote: > > > > Basically, it just seems to be wasting a good opportunity for overloading > > here. > > I really don't understand why one have a Float and a Long_Float in the > first place? Why not simply have a Long_Float? In OpenGL, there are a number of different ways to specify translations, scales, vertices, normals, etc. GLfloat is normal single precision real numbers, useful for games. GLdouble is useful for scientific visualisation. Basically, it allows the programmer to pick which one to use. Games require speed, so GLfloat is enough, scientific apps don't. If I only provide one, the Long_Float/GLdouble variant, I'll either have to cast it down to GLfloat and use the fast function or use the slower function. Not an option. It's designed that way for a reason. Luke.