- list of operating systems that can run C++? - 5 Updates
legalize+jeeves@mail.xmission.com (Richard): Mar 29 09:17PM [Please do not mail me a copy of your followup] Christopher Pisz <nospam@notanaddress.com> spake the secret code >Does there exist a list of operating systems/hardware that I can target >in C++? All of them. >My office mate is arguing with me that C# is now more portable than C++, >because...mono. He is making me angry. Every other language sits on top of some layer that is either C or C++. Since C++ can be written to be link compatible with C that means that C++ targets all the operating systems. The barrier is more one of tools that target the operating system than it is of languages. Anything that can run Mono (how do you think Mono itself is built?) is going to run C++ applications as well because.... guess what? Mono is written in C. For instance look in the io-layer folder for Mono on github: <https://github.com/mono/mono>. It's all C code. Microsoft VS team gave out a shirt one year that said "My compiler compiled yours" referring to the fact that the C# compiler was written in C++. They've since got a self-hosting compiler for C# written in C#, but something has to bootstrap that process and the bottom layer in that bootstrap is almost certainly C or C++. About the only "operating system" I can think of that can't be targetted directly with C++ are those systems where the language is the operating system. A small embedded FORTH implementation uses assembly language to bootstrap up a minimal FORTH dictionary and then the rest of it is all written in FORTH. Open Firmware is an initiative that works this way. <https://en.wikipedia.org/wiki/Open_Firmware> Another example might be something like a LISP Machine, where everything is written in LISP. <https://en.wikipedia.org/wiki/Lisp_machine> -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Computer Graphics Museum <http://computergraphicsmuseum.org> The Terminals Wiki <http://terminals.classiccmp.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
legalize+jeeves@mail.xmission.com (Richard): Mar 29 09:36PM [Please do not mail me a copy of your followup] (Richard) legalize+jeeves@mail.xmission.com spake the secret code >going to run C++ applications as well because.... guess what? Mono is >written in C. For instance look in the io-layer folder for Mono on >github: <https://github.com/mono/mono>. It's all C code. In anticipation of nitpicks: The bottom layer of the mono runtime is written in C (you'd think they'd have chosen C++, but whatever). The mono C# compiler is written in C#, but it needs the mono runtime to run. To bootstrap everything from source, and not prebuilt mono runtimes, you need a C compiler. -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Computer Graphics Museum <http://computergraphicsmuseum.org> The Terminals Wiki <http://terminals.classiccmp.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
Marcel Mueller <news.5.maazl@spamgourmet.org>: Mar 29 11:52PM +0200 On 29.03.16 22.27, Christopher Pisz wrote: > Does there exist a list of operating systems/hardware that I can target > in C++? Probably it will be much more difficult to find any recent OS that does /not/ support C++. > My office mate is arguing with me that C# is now more portable than C++, It is more portable because the included class library has more built-in features (e.g. networking) than the C++ runtime. Although that changed a bit with C++11 where things like threads are now also part of the standard. > because...mono. He is making me angry. Portable != supported. Any C/C++ application that uses more than the standard library is not really portable. You need to have some platform specific code. In practice this applies to really any larger application, although the non portable code might be small. But with Mono/.NET you can run into the same trouble. E.g. MS will it make easy to write non-portable code, e.g. as soon as you use WPF or something like that. On the other side C++ has the risk of unchecked memory access and UB. Although this is quite small if you really write C++ code, but in practice much existing code lacks of C++ since it uses char*, pointer arithmetic and other bad things all over. So nearly always the discussion about the right language is just a fan-boy war. Personally I prefer C++ too, because I can express many thing in this language without an ugly work around and without a runtime overhead. But for commercial development I use C#, because of the better maintainability and better availability of sufficiently skilled programmers. The latter is mainly due to the reduced language complexity and less UB in C# - although the distance decreases. And only a few people have enough discipline not to use common code anti-patterns in C++ that are likely to cause UB. Marcel |
"Öö Tiib" <ootiib@hot.ee>: Mar 29 03:01PM -0700 On Tuesday, 29 March 2016 23:26:47 UTC+3, Christopher Pisz wrote: > Does there exist a list of operating systems/hardware that I can target > in C++? Processor architectures supported by: GCC https://gcc.gnu.org/backends.html Few and special case things are that you can not target in C++. > My office mate is arguing with me that C# is now more portable than C++, > because...mono. He is making me angry. That is so silly. The tongue does not matter. What matters is what is expressed in it. So better compare what known software is written in C++ and what is in C#. |
Christopher Pisz <nospam@notanaddress.com>: Mar 29 06:26PM -0500 On 3/29/2016 4:52 PM, Marcel Mueller wrote: > people have enough discipline not to use common code anti-patterns in > C++ that are likely to cause UB. > Marcel I agree. Don't want to language war. I am not anti C# or strictly pro C++, but I find the portability argument to be ludicrous! I think he somehow defines "portability" differently, and seems to be stuck somehow that there was a compilation step targeting the platform, while I view it as the amount of code that has to change. If I have to compile the same code twice with a platform switch, it is one mouse click, so I don't get it. Sure you can take interpreted code from one platform to the next where the interpreter exists, but that's what 3 or 4 platforms? There are probably thousands if not millions of pieces of hardware out there that utilize C++. I think I am just running into modern language fanaticism. Ironic, because when I was 20 something, I was the one that had language fanaticism. -- I have chosen to troll filter/ignore all subthreads containing the words: "Rick C. Hodgins", "Flibble", and "Islam" So, I won't be able to see or respond to any such messages --- |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment