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.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, STOX_REPLY_TYPE autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 109fba,cd8ed9115942852f X-Google-NewGroupId: yes X-Google-Thread: 103376,b92b95c9b5585075 X-Google-NewGroupId: yes X-Google-Attributes: gid4f1905883f,gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!feeds.phibee-telecom.net!zen.net.uk!dedekind.zen.co.uk!news.netfront.net!not-for-mail From: "Paul" Newsgroups: comp.lang.c++,comp.lang.ada Subject: Re: Why use C++? Date: Thu, 11 Aug 2011 16:11:21 +0100 Organization: Netfront http://www.netfront.net/ Message-ID: References: <4209d782502610f6dbc08933d358b6d6@dizum.com> NNTP-Posting-Host: 149.254.226.181 Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Trace: adenine.netfront.net 1313075505 34686 149.254.226.181 (11 Aug 2011 15:11:45 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Thu, 11 Aug 2011 15:11:45 +0000 (UTC) In-Reply-To: <4209d782502610f6dbc08933d358b6d6@dizum.com> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6002.18197 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18463 Xref: g2news2.google.com comp.lang.c++:92575 comp.lang.ada:21510 Date: 2011-08-11T16:11:21+01:00 List-Id: "Nomen Nescio" wrote in message news:4209d782502610f6dbc08933d358b6d6@dizum.com... > "Jed" wrote: > >> I know a little bit (enough to "be dangerous") of Intel assembly, and it >> looks like C/C++ integer types are a direct reflection of what is at that >> level. Even the fact that by default, integer literals are signed. So in >> that respect, I think they are special. They are chosen for efficiency as >> a direct reflection of hardware (I'm not saying all hardware is the same, >> mind you). > > What? > > Of course there are unsigned integers even in the twisted world of Intel. > What's more C/C++ integer types are not a direct reflection of anything > except the language spec otherwise the code would be completely not > portable. > >> You have to build those types though based upon the built-in ones, yes? >> If so, aren't modular, wrapping and overflow-checked equally good for >> something and all worthy of being in a language? Of course there is >> signed, unsigned and the different bit widths as candidates also. And are >> not those built-ins good to use "raw" in many cases? Are you suggesting >> that a language have NO types? There is assembly language for that (and >> the instruction set pretty much dictates what types you have to work with >> at that level). > > It's not true assembly language has no types, especially with certain > systems and certain assemblers. The type in assembly language *does* > usually reflect the native types of the underlying machine very closely, > obviously. > I think what jedhiah means is there are no types at asm level, just sizes such as Byte, DWord, QWord etc. These scalars are neither signed not unsigned but there are operations that can process the data which assumes a sign. Of course there are different types if you consider scalars, real numbers, pointers and UDT's as different types. --- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---