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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,971aa11c293c3db1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-20 08:36:41 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!psinet-eu-nl!psiuk-p4!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Ada The Best Language? Date: Fri, 20 Jul 2001 10:56:51 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9j9grk$6na$1@nh.pace.co.uk> References: <3B59CD72@MailAndNews.com> <3B5573DA.5ABA8EA7@earthlink.net> <9j94gj$1uk6$1@norfair.nerim.net> <3B581E6B.6FB1DAEF@earthlink.net> <9j9cip$238u$1@norfair.nerim.net> NNTP-Posting-Host: 136.170.200.133 X-Trace: nh.pace.co.uk 995641012 6890 136.170.200.133 (20 Jul 2001 14:56:52 GMT) X-Complaints-To: newsmaster@pace.co.uk NNTP-Posting-Date: 20 Jul 2001 14:56:52 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:10339 Date: 2001-07-20T14:56:52+00:00 List-Id: Some attributes in Ada can be overriden - where it makes sense. However, one of the things I know of no way of doing in C++ are things where I want the compiler to track ranges, etc., of subtypes and use the attributes to make sure everything works based on what the compiler knows. What you are referring to as "traits" sounds like nothing more than implementing functions (or macros?) to return characteristics of complex types - not getting the compiler to figure things out for you and track all that info so you don't have to. If you look at the really rich collection of attributes that Ada provides for objects, types, subprograms, tasks, etc., I think you will see that these can be extremely useful in all sorts of ways. They can aid in portability, or isolate the impact of changes or provide all sorts of useful information about the data and code you are using that helps develop more flexible & adaptable applications. Check out Annex K of the ARM (on-line available at http://www.adapower.org/ - look under "Reference" and "On-line version of the Ada 95 Reference Manual at AdaPower.com ") You will find a wealth of things available to you that are not paralleled in C++ or any number of other languages. I particularly like them for mathematical computations! MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "Bertrand Augereau" wrote in message news:9j9cip$238u$1@norfair.nerim.net... > That's right it's not as much automated as in Ada (anyway there's no value > range in C++), it is merely a "technique", but you can do really nice stuff > with this. > For instance: > Can you implement your own 'attributes in Ada to be evaluated at compile > time? I guess not, but I haven't been doing Ada for some time. And that's > what traits address in C++. > And traits is just the upper part of the template metaprogramming in C++ > iceberg (which is not melting). > If you want something really interesting to read, go for "Modern C++ Design: > Generic Programming and Design Patterns Applied" by Andrei Alexandrescu... > And look for Loki(related to the book) and boost libraries on the web. > It is about Metaprogramming and it is worth reading even if you don't do C++ > intensively (though a bit hard if you're not used to templates), because I > guess this will become more and more important, though most compilers are > not good enough for allowing everything (partial specialization) (but it's > getting better this days)... > I know that you will say that Ada works NOW, but I have to ignore you and > watch somewhere else ;-) > If you only use some subset of C++ features, everybody support these. Maybe > that's why your "C++ experts" buddies don't use that, or because it wasn't > popular (it's still not in fact) at this time. > > By the way MSVC++ is not much compliant, though I have to use it everyday > because with Intel c++ compiler plugin it's the best code generator for x86 > architectures...