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,5b7ee26df9f9c357 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!gegeweb.org!aioe.org!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: OpenGL in Ada Date: Sun, 11 Jul 2010 05:30:31 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: J4HSNf9Eqj44wTz1J3b8lQ.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Tom's custom newsreader Xref: g2news1.google.com comp.lang.ada:12322 Date: 2010-07-11T05:30:31+00:00 List-Id: > >>> Procedure Color ( red, green, blue : in double ); > >>> Procedure Color ( red, green, blue : in float ); > > One problem you'll have is if a user wants to make a call with all > literals, i.e. Color(1, 2, 3) or Color(1.0, 2.0, 3.0), the compiler > won't know which version to use. The best solution I've found (besides > making users specify a type) And what's wrong with requiring the user to be unambiguous by specifying a type? It's unlikely there will be a lot of calls with all literals (unless generated by some program) so it shouldn't be onerous. And "Float'(1.0)" is clearer to the person reading the code five years from now than "Color_F".