Should I learn C++ or Java now?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alexander Terekhov

    #31
    Re: Should I learn C++ or Java now?


    Victor Bazarov wrote:
    [...][color=blue]
    > I think that Stroustrup's Special Edition is the right book.[/color]

    Oh yeah.


    (Subject: Re: How to define a map with "non-standard" key)
    [color=blue]
    > It doesn't have all answers, that's why it needs to be
    > complemented by, say, "The C++ Templates". ...[/color]

    Sure. It should have helped you. Apparently, it didn't work in your
    case for some reason.

    regards,
    alexander.

    Comment

    • Peter van Merkerk

      #32
      Re: Should I learn C++ or Java now?

      > Peter, I think some emotions (perhaps rubbing off from earlier in[color=blue]
      > the thread) make you jump to conclusions.[/color]

      Frankly I see nothing is this thread, or even in this entire newsgroup
      to get emotional about, but thank you for your concern.
      [color=blue]
      >I asked the question.
      > Why do you need to see some kind of a hidden agenda behind it?
      > Why do you think it's an attempt to censor anything or a statement
      > against anything?[/color]

      To me, your posting looked more like a allergic response. Sentences like
      "If you know Java so much better, what are you doing here?" and "You
      advocate using Java in a C++ newsgroup." suggest to me that there is
      apparently something inappropriate about suggesting Java might be better
      for the OP in a C++ newsgroup. Apparently I was wrong, my apologies.
      [color=blue]
      > I am in no way against Java or any other language. However, bold
      > statements indicating superiority of anything over something else,
      > which usually aren't or cannot be substantiated, lead to agitated
      > state of the participants of the discussion.[/color]

      'mjm' did provide (sometimes invalid or at least way to general)
      arguments why he believes Java is a better choice for the OP. Again I
      don't agree with his assessment, but that does not necessarily make his
      posting inappropriate.
      [color=blue]
      > If that (agitation)
      > is _not_ the intention, some kind of calming interruption is needed.[/color]

      Your postings here are generally good, accurate and usefull for the OP.
      But IMHO of all the qualities your postings have, being "calming" is
      usually not one of them. On the other end of the cable they appear
      sometimes to be a bit harsh.
      [color=blue]
      > I simply asked the question to see if 'mjm' had anything to say
      > that would clear him/her of my suspicion.
      > Yes, I suspect that 'mjm' is trolling (wilfully or not). But I
      > can be mistaken and that's why I've asked the question.[/color]

      If you really think that 'mjm' is trolling, my advice would be don't
      feed the troll. If he would be trolling, I would expect him to be the
      starter of the thread or at least make a crossposting to one of the
      comp.lang.java. * groups. Personally I think 'mjm' is just a Java
      programmer struggling with C++, blaming his own inadequacies on the
      language.
      [color=blue]
      > Take a deep breath. Count to ten. There is no need to jump on
      > anyone's throat. Yet.[/color]

      Maybe you should listen to your own advice as well.

      Enough said about this...

      --
      Peter van Merkerk
      peter.van.merke rk(at)dse.nl



      Comment

      • mjm

        #33
        Re: Should I learn C++ or Java now?

        "Victor Bazarov" <v.Abazarov@att Abi.com> wrote in message news:<UKySa.106 772$Ph3.13452@s ccrnsc04>...
        [color=blue]
        > What's your example of 'concise'?[/color]

        I liked Flanagan's Java in a nutshell. The scope is much more limited
        but it is very short and fairly complete.

        I have a negative view of Stroustrup. The facts are diffuse, spread
        all over the place and important topics are not treated exhaustively
        in one place.
        In addition to that there does not seem to be any desire to elucidate
        what abstract principle or quality any given language construct aims
        to express.
        For example Barton-Nachman do this with EVERY major language
        construct.

        Some examples of what I could not find:

        I could not find a definitive comparison of the notion of a variable
        to that of a reference. If you just read the index for the key
        "variable":

        variable:
        constructor for global 252
        constructor for local 245
        global 200, 228
        number of argument 154
        temporary 244, 254

        There does not seem to be a place where the basic notion of a variable
        itself
        is treated. On page 200 and 228 there is no elucidation on the notion
        of a variable. It is not worth my while to turn to page 244 or 254.


        Elaboration on const member functions: page 229 (the anniversary
        addition, only item about const member functions in the index).
        Explanation by trivial example, there is not even an attempt to
        formulate a definition of what a const member function is ("note the
        keyword const, the function does not change the onbject") No
        elaboration on such question such as

        Can a const member function call a nonconst one as long as it does not
        modify the object? Can a const member function return a nonconst
        reference to data?

        This is grossly inadequate. Maybe all these questions are answered
        somewhere in the book but topics of that importance need to be treated
        exhaustively in one location.

        Nested classes: p293 (only reference in the index). There is only an
        example. No features are elucidated. Reading this in reference to
        nested class is totally useless and should not be included in the
        index.

        Some questions are treated under the heading of "member class" in the
        appendix on page 852. Ie. no access either way but you can grant
        access to the enclosing class by declaring the nested class a friend
        of the enclosing class.

        So, can the constructor of the member class then use data from the
        enclosing class? Ie. construction of the member class would be tied to
        an object of the enclosing class:

        obj.new nested(i);

        No elaboration. I am sure you can answer all that drawing on the
        totality of the diffuse knowledge presented in this book. But not
        posing and answering these questions in a treatise of 1000 pages is a
        deficiency.

        C++ distilled by Ira Pohl is articulated much better. I think this
        author is one to consider.

        Comment

        • Victor Bazarov

          #34
          Re: Should I learn C++ or Java now?

          "mjm" <spyqqqdia@yaho o.com> wrote...[color=blue]
          > "Victor Bazarov" <v.Abazarov@att Abi.com> wrote in message[/color]
          news:<UKySa.106 772$Ph3.13452@s ccrnsc04>...[color=blue]
          >[color=green]
          > > What's your example of 'concise'?[/color]
          >
          > I liked Flanagan's Java in a nutshell. The scope is much more limited
          > but it is very short and fairly complete.[/color]

          Perhaps "C++ in a nutshell" would be similar to what you're looking
          for. Stroustrup is definitely not that.
          [color=blue]
          > I have a negative view of Stroustrup. The facts are diffuse, spread
          > all over the place and important topics are not treated exhaustively
          > in one place.
          > In addition to that there does not seem to be any desire to elucidate
          > what abstract principle or quality any given language construct aims
          > to express.
          > For example Barton-Nachman do this with EVERY major language
          > construct.
          >
          > Some examples of what I could not find:[/color]

          BTW, what edition are we talking about?
          [color=blue]
          > I could not find a definitive comparison of the notion of a variable
          > to that of a reference. If you just read the index for the key
          > "variable":
          >
          > variable:
          > constructor for global 252
          > constructor for local 245
          > global 200, 228
          > number of argument 154
          > temporary 244, 254
          >
          > There does not seem to be a place where the basic notion of a variable
          > itself
          > is treated. On page 200 and 228 there is no elucidation on the notion
          > of a variable. It is not worth my while to turn to page 244 or 254.[/color]

          "Variable" is one of the base concepts of programming. "TC++PL" is
          not supposed to teach programming, only the language. If you take
          TC++PL without knowing what "a variable" is, I say, you're not ready
          for it.
          [color=blue]
          > Elaboration on const member functions: page 229 (the anniversary
          > addition, only item about const member functions in the index).
          > Explanation by trivial example, there is not even an attempt to
          > formulate a definition of what a const member function is ("note the
          > keyword const, the function does not change the onbject") No
          > elaboration on such question such as
          >
          > Can a const member function call a nonconst one as long as it does not
          > modify the object? Can a const member function return a nonconst
          > reference to data?[/color]

          Have you really seen any book that is able to answer _any_ questions
          that happen to come to the reader's mind?

          If you still need answers to those questions, here they are: no and no.
          Both involve conversions that are not allowed implicitly.
          [color=blue]
          > This is grossly inadequate.[/color]

          "Grossly", huh?
          [color=blue]
          > Maybe all these questions are answered
          > somewhere in the book but topics of that importance need to be treated
          > exhaustively in one location.[/color]

          I see you have a good understanding what is important to have in
          a book. I say you should attempt writing your own.
          [color=blue]
          > Nested classes: p293 (only reference in the index). There is only an
          > example. No features are elucidated. Reading this in reference to
          > nested class is totally useless and should not be included in the
          > index.[/color]

          Index should not be the first place you open when reading a book.
          You should attempt reading the book in its normal order or in the
          order the author suggests in the preface.
          [color=blue]
          > Some questions are treated under the heading of "member class" in the
          > appendix on page 852. Ie. no access either way but you can grant
          > access to the enclosing class by declaring the nested class a friend
          > of the enclosing class.
          >
          > So, can the constructor of the member class then use data from the
          > enclosing class? Ie. construction of the member class would be tied to
          > an object of the enclosing class:
          >
          > obj.new nested(i);
          >
          > No elaboration.[/color]

          You're trying to apply Java concepts to C++. You apparently need
          a book "C++ for Java programmers". A person without prejudice should
          not have a problem with nested types. Nesting of types does not
          presume nesting of objects (unlike in Java). Once you abstract from
          what you know in Java and try simply learning C++, you might actually
          do better with Stroustrup. Unless you don't have to make an effort,
          of course.
          [color=blue]
          > I am sure you can answer all that drawing on the
          > totality of the diffuse knowledge presented in this book. But not
          > posing and answering these questions in a treatise of 1000 pages is a
          > deficiency.[/color]

          Trying to answer them would add more 1000s of pages to that book.
          Just imagine looking at a book 3-4 thousands of pages thick. Do you
          think you would buy it? Do you think you'd treat it as a normal book
          or would you again try to use it as a tome of encyclopaedia, starting
          with the Index?
          [color=blue]
          > C++ distilled by Ira Pohl is articulated much better. I think this
          > author is one to consider.[/color]

          Good. So, you will use Ira Pohl's book. That's why there are more
          than two books published on the subject.

          One thing I think is important to understand. No book can cover all
          topics pertaining to such huge and complex set of concepts and rules
          like C++ language to everybody's satisfaction. The Special Edition
          already has more than 1000 pages and would probably still not satisfy
          such picky critic as yourself. Combine "TC++PL", "C++ Templates",
          "C++ Standard Library", "Standard C++ Streams", "Design and Evolution
          of C++", "Advanced C++", "Modern C++ Design", "Effective" series,
          "Exceptiona l" series, "Large-Scale C++ Software Design" and you would
          probably come close to covering 50% of all the questions you might
          have. And we haven't even begun talking platform-specific nonsense.

          Perhaps you thought C++ would be easy, once you learned Java. You
          grabbed the first book that you heard of, the one that started it all,
          and went for the index to see how the syntax is different from Java
          so that you could quickly rewrite what you have into C++ and be done
          with it. Oops, it doesn't even have those concepts you were used to
          while doing some Web server development. And, instead of scrapping
          your previous approach and starting with the clean slate, you throw
          the book away with disgust and a label of "inadequacy ". However, as
          shown by countless examples over the past fifteen years, other
          programmers successfully used that book to learn the language and
          never complained. I am not going to answer it, but a question is
          nagging: who's inadequate?

          Victor


          Comment

          • Ron Natalie

            #35
            Re: Should I learn C++ or Java now?


            "Victor Bazarov" <v.Abazarov@att Abi.com> wrote in message news:vhohrljgb7 216b@corp.super news.com...
            [color=blue]
            >
            > Perhaps "C++ in a nutshell" would be similar to what you're looking
            > for. Stroustrup is definitely not that.[/color]

            C++ in a Nutshell has only come out in the past few months or so. It's
            roughly along likes of the old ARM (only attempts to be up-to-date with
            the latest standard).

            I don't use Stroustrup anymore. It's a good book for the concepts, but I hardly
            use it as a reference. I pretty much use the standard itself these days and
            the two Jostutits books otherwise.



            Comment

            • Bjarne Stroustrup

              #36
              Re: Should I learn C++ or Java now?

              "Victor Bazarov" <v.Abazarov@att Abi.com> wrote in message >
              [color=blue]
              > I only put Stroustrup to rest about three years ago, eight years
              > after first opening it.[/color]

              We are in 2003, three years ago must have been 2000, eight years
              before that must have been something like 1992 - five years before the
              current edition was written and five years before we had the final
              text of the standard (in 1997).

              Actually, the most recent printings of TC++PL3 reflect the 2003
              revisions to the standard (fortunately, those are minor).

              [color=blue]
              > Yes, the Standard is good enough as a reference to what language contains.[/color]

              For people who already understand the major programming techniques and
              have a reasonable level of professionalism , that's obviously the case.
              That's why we wrote the standard. However, it seems to me that many
              programmers still suffer misconceptions such as "C++ is C with a few
              features added" or "C++ is a somewhat odd object-oriented language".
              Both views miss the point badly (leading to ugly, inefficient, and
              hanrd-to-maintain code) and very few people would be dissuaded from
              their misconceptions by the standard (or by any manual). My impression
              is that a large number of people still think that all they need is a
              manual/reference/standard.

              [color=blue]
              > Books are still needed
              > to explain the Standard and to provide idioms and patterns,
              > which are usually missing from references.[/color]

              Yes, and the underlying assumptions and fundamental programming
              concepts tend to be missing also.

              To understand a language is to understand the programming techniques
              it supports and how it supports them. A manual/reference describe only
              the latter, and typically in a bottom up manner.

              - Bjarne Stroustrup, www.research.att.com/~bs

              Comment

              • Victor Bazarov

                #37
                Re: Should I learn C++ or Java now?

                "Bjarne Stroustrup" <bs@research.at t.com> wrote...[color=blue]
                > "Victor Bazarov" <v.Abazarov@att Abi.com> wrote in message >
                >[color=green]
                > > I only put Stroustrup to rest about three years ago, eight years
                > > after first opening it.[/color]
                >
                > We are in 2003, three years ago must have been 2000, eight years
                > before that must have been something like 1992 - five years before the
                > current edition was written and five years before we had the final
                > text of the standard (in 1997).[/color]

                You better believe it. If I'm not mistaken, I have three editions
                -- the first in Russian, then the second and the special in English.
                The fact that I don't pick it up for my daily excursions into C++
                doesn't mean it lost its attractiveness in general. It just means
                that I feel I've outgrown it. Perhaps that feeling is temporary.
                [color=blue]
                > Actually, the most recent printings of TC++PL3 reflect the 2003
                > revisions to the standard (fortunately, those are minor).[/color]

                And I am sure those are going to be useful to many more programmers
                when they decide to set aside some time to study the language.
                [color=blue][color=green]
                > > Yes, the Standard is good enough as a reference to what language[/color][/color]
                contains.[color=blue]
                >
                > For people who already understand the major programming techniques and
                > have a reasonable level of professionalism , that's obviously the case.
                > That's why we wrote the standard.[/color]

                You know what's missing, though? A book on rationales used to put
                the Standard together and subsequent discussions on defects and
                corrections/additions. Yes, I know of D&E, but it's old and is not
                as detailed as I'd like to see such a book. Or, could it be there
                is already such a creation and I'm the last one to know about it?
                [color=blue]
                > However, it seems to me that many
                > programmers still suffer misconceptions such as "C++ is C with a few
                > features added" or "C++ is a somewhat odd object-oriented language".
                > Both views miss the point badly (leading to ugly, inefficient, and
                > hanrd-to-maintain code) and very few people would be dissuaded from
                > their misconceptions by the standard (or by any manual). My impression
                > is that a large number of people still think that all they need is a
                > manual/reference/standard.[/color]

                Well, at some point, I believe, every professional switches from
                textbooks to references and codes/standards. What is rather sad
                is that some programmers coming from another language believe that
                all they need to know is syntax for the constructs they've learned
                already. With existing fundamental differences between programming
                languages, such approach is, how should I put it?, reactionary, and
                unfortunately detrimental to the learning process. Instead of
                adding wisdom, expanding the horizon, the new knowledge seems
                contradicting to what they've learned to be good practices or only
                ways to achieve certain goals. Disappointment follows.

                Is there a way to prevent that? It seems that when it happens, the
                only way to put them on the right track is to add more trauma by
                showing that they've been following the wrong path, which inevitably
                produces more negative reaction, denial, antagonism, etc. Have you
                noticed something like that? Do you have any suggestions to help us
                help them to overcome certain deficiencies in the learning process?
                Does it help to be closer to those who are learning intensively,
                there at TAMU?

                In any way, thank you for participating, I am sure the readers here
                appreciate your time.

                Victor


                Comment

                • Frank Schmitt

                  #38
                  Re: Should I learn C++ or Java now?

                  "Agent Mulder" <mbmulder_remov e_this_@home.nl > writes:
                  [color=blue]
                  > Eljah> Are there any recommended books on Java or C++ (depending on which
                  > Eljah> language I should learn first) for the beginner who only know PHP and
                  > Eljah> BASIC?
                  > Eljah>
                  > Eljah> Sorry if this post some how offends somebody.
                  >
                  > Go to your local second hand bookstore and find the books
                  > on Java and C++. You'll probably find lots of both of them.
                  > Decide on the language by the documentation that you can get.
                  > It is not easy to recognize a good book but some general
                  > guidelines are:
                  >
                  > -good books are heavy books[/color]

                  That's so untrue, some of the best books I ever read are small & lightweight
                  ("Accelerate d C++", "The Pragmatic Programmer", ...), and most of the
                  computer / programming books with 1000+ pages are simply crap.

                  regards
                  frank

                  --
                  Frank Schmitt
                  4SC AG phone: +49 89 700763-0
                  e-mail: frank DOT schmitt AT 4sc DOT com

                  Comment

                  • Alexander Terekhov

                    #39
                    Re: Should I learn C++ or Java now?


                    Bjarne Stroustrup wrote:
                    [...][color=blue]
                    > To understand a language is to understand the programming techniques
                    > it supports and how it supports them.[/color]

                    AFAICS, C++ doesn't support things like: (see TC++PL)

                    void g(priority_queu e<string,String _cmp>& pq)
                    {
                    priority_queue< string> pq2(String_cmp( nocase));
                    pq = pq2; // ok: pq and pq2 are of the same type, pq now also uses String_cmp(noca se)
                    }

                    Or am I just missing (e.g. some errata) and/or misunderstandin g something?

                    regards,
                    alexander.

                    Comment

                    • mjm

                      #40
                      Re: Should I learn C++ or Java now?

                      "Victor Bazarov" <v.Abazarov@att Abi.com> wrote in message


                      Attacking Stroustrup is somewhat of a blasphemy. The book is a
                      monumental work
                      I understand this completely.
                      [color=blue]
                      >BTW, what edition are we talking about?[/color]

                      I am talking about the anniversary addition. This addition comes with
                      a tasteful white cover. Everything is in flawless Greek proportion.
                      Width, height and thickness of the book, the size of the letters, the
                      size of the cover everything.

                      The cover design is highly artistic. The letters are dark blue and
                      golden yellow. There is a picture of a wave breaking in an interesting
                      pattern. In the foreground are the impressive letters

                      C++

                      three dimensional and in translucent greenish yellow.
                      Bound into the book are two clothen bookmarks in blue and golden
                      yellow.
                      The paper, printing and page layout are all of the highest quality.

                      This is the very finest in book binding, the best that Addison Wesley
                      has to offer flawlessly delivered. This book does not go on your
                      bookshelf, it goes into a glass display stand on blue velvet.

                      Victor,

                      I feel that you are a man which must own a copy of this edition -- my
                      copy.
                      In full appreciation of its significance I have always kept it in a
                      separate
                      special drawer and in consequence it is in mint condition.
                      Email me and I will make you an offer you cannot refuse.

                      Comment

                      • Paul Dubuc

                        #41
                        Java to C++ transition tutorial



                        --
                        Paul M. Dubuc

                        Comment

                        • Victor Bazarov

                          #42
                          Re: Java to C++ transition tutorial

                          "Paul Dubuc" <pdubuc@cas.org > wrote in message
                          news:3F1EC63F.8 050705@cas.org. ..[color=blue]
                          > http://www.cs.brown.edu/courses/cs03...+tutorial.html
                          >[/color]

                          The "Books and References" section I see these words:

                          <<The C++ Programming Language,
                          by Bjarne Stroustrup (3rd Edition, Addison-Wesley, 1997)

                          Bjarne Stroustrup is the creator of the C++ programming language,
                          and this book is the reference that he has written. It is a good
                          reference book, but not one you would sit down and read to learn
                          the language. (There is a copy of this book in the Sunlab.)>>

                          I think the text of this comment needs adjustment. It should say
                          "It is a good reference book, but not one _I_ would sit down and..."
                          Whoever wrote this should speak for himself. I learned the language
                          from that book, and I am not alone.

                          Also, I strongly recommend the authors of this "tutorial" to visit
                          www.accu.org, the book review section. Major advances have been
                          made in the field of sharing the knowledge in book form since this
                          was created. I do not see recommendations for "The C++ Standard
                          Library" or for "C++ Templates". A gross miss, IMO.

                          Further inspection of this "tutorial" shows "pearls" like this:
                          <<Useless trivia: The order in which the instance variables are
                          initialized is not the order in which they appear in the
                          initializer list, but instead the order in which they are listed
                          in the class declaration.>>

                          My question is: why is this called "useless"?

                          IOW, I already think this "tutorial" is useless. No need to look
                          any further.

                          Victor


                          Comment

                          • Alexander Terekhov

                            #43
                            Re: Java to C++ transition tutorial


                            Victor Bazarov wrote:
                            [...][color=blue]
                            > I think the text of this comment needs adjustment. It should say
                            > "It is a good reference book, but not one _I_ would sit down and..."
                            > Whoever wrote this should speak for himself. I learned the language
                            > from that book, and I am not alone.[/color]

                            All statements are opinions, my fixated friend. Uhmm,



                            also needs adjustment, I guess.

                            "This book will help ME achieve that latter objective while educating
                            ME about general framework design. "

                            ACE sucks, BTW.
                            [color=blue]
                            >
                            > Also, I strongly recommend the authors of this "tutorial" to visit
                            > www.accu.org, the book review section. Major advances have been[/color]

                            Oh yeah. Francis is close to the establish "1K-computer-book" record.

                            [...][color=blue]
                            > IOW, I already think this "tutorial" is useless. No need to look
                            > any further.[/color]

                            Hey Bazarov-the-reviewer, you forget to plonk the URL.

                            regards,
                            alexander.

                            Comment

                            • Default User

                              #44
                              Re: Java to C++ transition tutorial



                              Alexander Terekhov wrote:
                              [color=blue]
                              > S/he means that this group is full of big assholes. S/he is correct.[/color]


                              Al, don't be so hard on yourself! Who luvs ya baby?




                              Brian Rodenborn

                              Comment

                              • Default User

                                #45
                                Re: Java to C++ transition tutorial



                                Alexander Terekhov wrote:
                                [color=blue][color=green]
                                > > Al, don't be so hard on yourself![/color]
                                >
                                > I can live with it. Sublimation, you know.[/color]


                                From the sublime to the ridiculous. Happens all the time.



                                Brian Rodenborn

                                Comment

                                Working...