Could everyone give me their opinions on what the top 5 qualities of the C++ Language are, please.
Could everyone give me their opinions on what the top 5 qualities of the C++ Language are, please.
Is this a homework assignment?
Best Regards,
Bonkey
its a research paper, this is part of the research. Im asking everyones opinion as part of my research, is that too much to ask?
-templates
-operator overloading
-the "this" pointer
-polymorphism
-constructor/destructor
These are some of the most compelling qualities of the language, in my opinion.
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
-Static type checking
-Classes
-Inheritance
-Templates
-Namespaces
In that order.
-Prelude
My best code is written with the delete key.
versatility.
portability.
multiparadigm.
type safety.
ability to inline asm right into c++ code.
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
... is not a quality of the C++ languageOriginally posted by Stoned_Coder
ability to inline asm right into c++ code.
hello, internet!
Thanks Stoned_coder, you answered my question perfectly, and thank you the rest of you.
in that case, i question how you define perfect; his answer does not involve matters of opinion, it is merely WRONG.Originally posted by Cgawd
Thanks Stoned_coder, you answered my question perfectly, and thank you the rest of you.
hello, internet!
may be wrong, but the rest of his answer is right, correct?ability to inline asm right into c++ code.
How is it wrong? The C++ standard specifies -in that case, i question how you define perfect; his answer does not involve matters of opinion, it is merely WRONG.
Therefore the C++ language provides a method for inlining asm 'right into c++ code'. Hence it is a quality of it. Asm may not be a quality of the C++ language, but unless I'm reading this incorrectly, it was never claimed to be.[dcl.asm] 7.4 The asm declaration
1 An asm declaration has the form
asmdefinition:
asm ( stringliteral
) ;
The meaning of an asm declaration is implementationdefined.
[Note: Typically it is used to pass information
through the processor to an assembler. —end note]
Joe
oh well, whatever. implementation defined still = useless; your 68k assembly code certainly wont run on an i86, and even on one processor accessing anything in a class will be difficult to impossible because of the different way classes store their info in memory.Originally posted by JoeSixpack
How is it wrong? The C++ standard specifies -
Therefore the C++ language provides a method for inlining asm 'right into c++ code'. Hence it is a quality of it. Asm may not be a quality of the C++ language, but unless I'm reading this incorrectly, it was never claimed to be.
hello, internet!
From a portability standpoint, then of course it useless. But that's hardly the point.implementation defined still = useless
It is a qualitity of the C++ language that it provides you with the option of inlining asm to access processor specific instructions.
Was this last statement right or wrong?
Joe
Well perhaps:
- classes
- templates
- overloading
- STL
- export keyword
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling
I'm glad many developers doesn't think like you, or else I would suffer the same fate as those poor Linux users staring at a monochrome terminal all day.Originally posted by moi
oh well, whatever. implementation defined still = useless;
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling