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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,56131a5c3acc678e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-07 07:35:00 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news-out.nuthinbutnews.com!propagator2-sterling!news-in.nuthinbutnews.com!cyclone1.gnilink.net!wn12feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Question about OO programming in Ada From: James Rogers References: <5JmdnUF_9o_ABE-iRTvUrg@rapidnet.com> Message-ID: User-Agent: Xnews/5.04.25 Date: Sun, 07 Dec 2003 15:34:59 GMT NNTP-Posting-Host: 12.73.182.171 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1070811299 12.73.182.171 (Sun, 07 Dec 2003 15:34:59 GMT) NNTP-Posting-Date: Sun, 07 Dec 2003 15:34:59 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:3203 Date: 2003-12-07T15:34:59+00:00 List-Id: Hyman Rosen wrote in news:l0BAb.601$kz2.183@nwrdny01.gnilink.net: > I don't think you do understand. For one, there is no "overhead" > whatsoever in using a class for encapsulation. And in C++ a type may > be the equivalent of tagged or not tagged, as you choose. Do you mean to say there is an equivalent of an un-tagged type for C++ classes? Is this also equivalent to a Java "final" class? How would you create a C++ equivalent of a ranged integer type that is also not the equivalent of an Ada tagged type? Is this done using templates? Templates do incur an overhead. The overhead is incurred at compile time rather than at run time, but there is still an overhead. While speaking of C++ templates, I am amazed at the power and limitations of C++ templates. The language for C++ templates appears to me to be an additional syntax beyond the C++ run time syntax. I was surprised to learn that C++ does not provide for floating point template parameters. This makes it impossible to provide a template for a ranged real type in C++. Jim Rogers