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: 109fba,cd8ed9115942852f X-Google-NewGroupId: yes X-Google-Thread: 103376,b92b95c9b5585075,start X-Google-NewGroupId: yes X-Google-Attributes: gid4f1905883f,gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.c++,comp.lang.ada Subject: Re: Why use C++? Date: Wed, 10 Aug 2011 22:05:32 +0300 Organization: Tidorum Ltd Message-ID: <9ag33sFmuaU1@mid.individual.net> References: <1e292299-2cbe-4443-86f3-b19b8af50fff@c29g2000yqd.googlegroups.com> <1fd0cc9b-859d-428e-b68a-11e34de84225@gz10g2000vbb.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net keVYTSk1MxWlY2nlq5kYygEPwRLFaYn5M8CJHtf/9IZkO62OYf Cancel-Lock: sha1:oSWOp4ZXl2qr8CmNOjSpFy3S5ZI= User-Agent: Mozilla-Thunderbird 2.0.0.24 (X11/20100328) In-Reply-To: <1fd0cc9b-859d-428e-b68a-11e34de84225@gz10g2000vbb.googlegroups.com> Xref: g2news2.google.com comp.lang.c++:92546 comp.lang.ada:21486 Date: 2011-08-10T22:05:32+03:00 List-Id: Stuart Redmann wrote: > Stuart Redmann wrote >>> Just one example: We use a lot of COM components in our company. If I >>> want to use them under C++, I have to >>> (A) Make sure that I initialize the COM run-time properly, >>> (B) #import the type libraries, >>> (C) generate mapping classes from the type libraries so that I can use >>> the interfaces like I can do under VB. > > Paul wrote: >> Yes the right tool for these type of applications is usually not C++. If >> your project was to create the COM object then C++ would probably be the >> language of choice. > > It is ;-) > > Sometimes I wish that there was a C++ interpreter as well. This way I > had to remember only one set of run-time library calls instead of two. > However, the industry prefers to re-invent the nth virtual machine and > the xth GUI toolkit. And of course, none of the popular programming > languages (not even Ada95) supports proper non-wrapping unsigned > integer types (and I have to use unsigned types for image > processing). In what way does Ada (95, or the current standard 2005) not support your needs for unsigned types? If you dislike the wrapping behaviour of the Ada "modular" unsigned types, what is wrong with defining your own unsigned integer type in Ada, as in type My_Number is range 0 .. 53621; or whatever range you need. This gives you non-wrapping arithmetic with run-time checks for overflow, underflow, and range. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .