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 X-Google-NewGroupId: yes X-Google-Attributes: gid4f1905883f,gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed.straub-nv.de!news2.arglkargh.de!news.wiretrip.org!news.dizum.com!sewer-output!mail2news-x2!mail2news From: Nomen Nescio Newsgroups: comp.lang.c++,comp.lang.ada Subject: Re: Why use C++? References: Message-ID: <4209d782502610f6dbc08933d358b6d6@dizum.com> Date: Thu, 11 Aug 2011 15:11:05 +0200 (CEST) Mail-To-News-Contact: abuse@dizum.com Organization: mail2news@dizum.com Xref: g2news1.google.com comp.lang.c++:82812 comp.lang.ada:20536 Date: 2011-08-11T15:11:05+02:00 List-Id: "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.