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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,7d14d8f47ca035bf X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-02 14:28:09 PST Path: supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.stanford.edu!feed.textport.net!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison Sender: usenet@www.newsranger.com References: <3AC8E799.189EE51C@bigfoot.com> Subject: Re: Ada Generic vs. C++ Templates Message-ID: Date: Mon, 02 Apr 2001 21:26:12 GMT NNTP-Posting-Host: 209.208.22.130 X-Complaints-To: abuse@newsranger.com X-Trace: www.newsranger.com 986246772 209.208.22.130 (Mon, 02 Apr 2001 17:26:12 EDT) NNTP-Posting-Date: Mon, 02 Apr 2001 17:26:12 EDT Organization: http://www.newsranger.com Xref: supernews.google.com comp.lang.ada:6379 Date: 2001-04-02T21:26:12+00:00 List-Id: In article <3AC8E799.189EE51C@bigfoot.com>, Francois Godme says... > >Ted Dennison a �crit : > >> all seem to implement templates differently. The Mozilla developers have >> gone so far as to ban the use of templates for this reason (in fact, its >> rule #1 in their portability guide). See >> http://www.mozilla.org/hacking/portable-cpp.html#dont_use_templates . One >> could say that for code meant to be portable, C++ templates have no power at >> all, as they can't be used. :-) > >In my daily work, we develop C++ templates code which compiles and runs the >same on two different platforms namely Visual C++ 6.0 on NT and aCC on HP-UX. What you are saying is that you have found an environment where the templates you happen to use work for two specific compilers. That says nothing about what would happen if one day you (or your marketing department) suddenly discovered a need to port your entire codebase to a third system which you have not designed your code against. Unless the Mozilla developers are lying (which I doubt), it appears that it is quite possible that you'll run aground on a compiler that does not support your templates. >I am not saying that all the implementations are perfect but that they are >mature enough to be of a practical use in a commercial environment. I didn't say they weren't of practical use. I just said they are not a feature that can be counted on to be portable; at least not according to Mozilla. Their website was quite recently updated, and still includes the template prohibition as rule #1. Since they run the most ported public application that I know of, I'm inclined to bow to their experience. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com