Thread: C++ Opinions

  1. #1

    Lightbulb C++ Opinions

    Could everyone give me their opinions on what the top 5 qualities of the C++ Language are, please.

  2. #2
    Registered User
    Join Date
    Aug 2002
    Posts
    170
    Is this a homework assignment?
    Best Regards,

    Bonkey

  3. #3
    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?

  4. #4
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    -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;
    }

  5. #5
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    -Static type checking
    -Classes
    -Inheritance
    -Templates
    -Namespaces

    In that order.

    -Prelude
    My best code is written with the delete key.

  6. #6
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    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

  7. #7
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    Originally posted by Stoned_Coder

    ability to inline asm right into c++ code.
    ... is not a quality of the C++ language
    hello, internet!

  8. #8
    Thanks Stoned_coder, you answered my question perfectly, and thank you the rest of you.

  9. #9
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    Originally posted by Cgawd
    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.
    hello, internet!

  10. #10
    ability to inline asm right into c++ code.
    may be wrong, but the rest of his answer is right, correct?

  11. #11
    Registered User
    Join Date
    Sep 2002
    Posts
    272
    in that case, i question how you define perfect; his answer does not involve matters of opinion, it is merely WRONG.
    How is it wrong? The C++ standard specifies -

    [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]
    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.
    Joe

  12. #12
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    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.
    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.
    hello, internet!

  13. #13
    Registered User
    Join Date
    Sep 2002
    Posts
    272
    implementation defined still = useless
    From a portability standpoint, then of course it useless. But that's hardly the point.

    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

  14. #14
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    Well perhaps:
    • classes
    • templates
    • overloading
    • STL
    • export keyword
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  15. #15
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    Originally posted by moi
    oh well, whatever. implementation defined still = useless;
    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.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Opinions on custom system build
    By lightatdawn in forum Tech Board
    Replies: 2
    Last Post: 10-18-2005, 04:15 AM
  2. Opinions?
    By Decrypt in forum C++ Programming
    Replies: 1
    Last Post: 09-18-2005, 05:29 PM
  3. Opinions on where to start?
    By mitchell_annix in forum C++ Programming
    Replies: 3
    Last Post: 05-03-2005, 10:18 PM
  4. Favors and Opinions
    By sean in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 08-01-2003, 10:04 PM
  5. Need some opinions
    By Fool in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 12-17-2001, 07:39 PM