initialization vs assignment

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alf P. Steinbach

    #16
    Re: [FAQ] Re: initialization vs assignment

    * "Steven T. Hatton" <susudata@setid ava.kushan.aa> schriebt:[color=blue]
    >
    > It seems to me 'Please read the FAQ before posting' could be taken as
    > 'Please RTFFAQ'.[/color]

    Just spell it out: Read The Fucking Manual.

    With prudish & easily offended Americans (who, without noticing any of it,
    offend all others not by their choice of words but by their actions) all over
    the net, however, it is perhaps best not asserted in that form.

    It's a mystery to me how MIT could set up the RTFM site in the first place,
    but then MIT has not only the best & brightest of the US population, but also
    many bright people from the rest of the world. I am quite sure that in
    current Norway, striving to be more American than the Americans, something
    like the RTFM could never have been set up. But then we no longer have any
    technical educational institutions left in Norway -- the miniature MIT
    called NTH was, a few years ago, subsumed by a humanities oriented university.

    --
    A: Because it messes up the order in which people normally read text.
    Q: Why is top-posting such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing on usenet and in e-mail?

    Comment

    • Alf P. Steinbach

      #17
      Re: [FAQ] Re: initialization vs assignment

      * "Steven T. Hatton" <susudata@setid ava.kushan.aa> schriebt:[color=blue]
      >
      > It seems to me 'Please read the FAQ before posting' could be taken as
      > 'Please RTFFAQ'.[/color]

      Just spell it out: Read The Fucking Manual.

      With prudish & easily offended Americans (who, without noticing any of it,
      offend all others not by their choice of words but by their actions) all over
      the net, however, it is perhaps best not asserted in that form.

      It's a mystery to me how MIT could set up the RTFM site in the first place,
      but then MIT has not only the best & brightest of the US population, but also
      many bright people from the rest of the world. I am quite sure that in
      current Norway, striving to be more American than the Americans, something
      like the RTFM could never have been set up. But then we no longer have any
      technical educational institutions left in Norway -- the miniature MIT
      called NTH was, a few years ago, subsumed by a humanities oriented university.

      --
      A: Because it messes up the order in which people normally read text.
      Q: Why is top-posting such a bad thing?
      A: Top-posting.
      Q: What is the most annoying thing on usenet and in e-mail?

      Comment

      • Victor Bazarov

        #18
        Re: [FAQ] Re: initialization vs assignment

        "Steven T. Hatton" <susudata@setid ava.kushan.aa> wrote...[color=blue]
        > Victor Bazarov wrote:
        >[color=green]
        > > "Steven T. Hatton" <susudata@setid ava.kushan.aa> wrote...[color=darkred]
        > >> Victor Bazarov wrote:
        > >>
        > >> > "Charles Stapleton" <cStapleton@no. junk> wrote...
        > >> >> Given the folowing class
        > >> >>
        > >> >> class Ctest{
        > >> >> public:
        > >> >> Ctest( int i, int j) :a(i) { b = j; }
        > >> >> private:
        > >> >> int a, b;
        > >> >> }
        > >> >>
        > >> >> When creating an object of type Ctest, what advantage is there to[/color]
        > > setting[color=darkred]
        > >> >> the member variables a and b using initialization, :a(i), as opposed
        > >> >> to using assignment, b = j.
        > >> >
        > >> > This is answered in the FAQ Lite (you can find it if you follow the
        > >> > link http://www.parashift.com/c++-faq-lite/). Please read the FAQ
        > >> > before posting.
        > >> >
        > >> > Victor
        > >> Why?[/color]
        > > Because[/color]
        >
        > It seems to me 'Please read the FAQ before posting' could be taken as
        > 'Please RTFFAQ'.[/color]

        It could just as well be taken at its face value. What's your F point?


        Comment

        • Victor Bazarov

          #19
          Re: [FAQ] Re: initialization vs assignment

          "Steven T. Hatton" <susudata@setid ava.kushan.aa> wrote...[color=blue]
          > Victor Bazarov wrote:
          >[color=green]
          > > "Steven T. Hatton" <susudata@setid ava.kushan.aa> wrote...[color=darkred]
          > >> Victor Bazarov wrote:
          > >>
          > >> > "Charles Stapleton" <cStapleton@no. junk> wrote...
          > >> >> Given the folowing class
          > >> >>
          > >> >> class Ctest{
          > >> >> public:
          > >> >> Ctest( int i, int j) :a(i) { b = j; }
          > >> >> private:
          > >> >> int a, b;
          > >> >> }
          > >> >>
          > >> >> When creating an object of type Ctest, what advantage is there to[/color]
          > > setting[color=darkred]
          > >> >> the member variables a and b using initialization, :a(i), as opposed
          > >> >> to using assignment, b = j.
          > >> >
          > >> > This is answered in the FAQ Lite (you can find it if you follow the
          > >> > link http://www.parashift.com/c++-faq-lite/). Please read the FAQ
          > >> > before posting.
          > >> >
          > >> > Victor
          > >> Why?[/color]
          > > Because[/color]
          >
          > It seems to me 'Please read the FAQ before posting' could be taken as
          > 'Please RTFFAQ'.[/color]

          It could just as well be taken at its face value. What's your F point?


          Comment

          • Steven T. Hatton

            #20
            Re: [FAQ] Re: initialization vs assignment

            Alf P. Steinbach wrote:
            [color=blue]
            > * "Steven T. Hatton" <susudata@setid ava.kushan.aa> schriebt:[color=green]
            >>
            >> It seems to me 'Please read the FAQ before posting' could be taken as
            >> 'Please RTFFAQ'.[/color]
            >
            > Just spell it out: Read The Fucking Manual.
            >
            > With prudish & easily offended Americans (who, without noticing any of it,
            > offend all others not by their choice of words but by their actions) all
            > over the net, however, it is perhaps best not asserted in that form.
            >
            > It's a mystery to me how MIT could set up the RTFM site in the first
            > place, but then MIT has not only the best & brightest of the US
            > population, but also
            > many bright people from the rest of the world. I am quite sure that in
            > current Norway, striving to be more American than the Americans, something
            > like the RTFM could never have been set up. But then we no longer have
            > any
            > technical educational institutions left in Norway -- the miniature MIT
            > called NTH was, a few years ago, subsumed by a humanities oriented
            > university.
            >[/color]

            It's not the idea of pointing people to the FAQ that I was addressing. It
            was the confrontational undercurrent that seems to lie just below the
            surface. Say the wrong thing on the newsgroup and the next thing you know,
            you'll have someone going berserk and using profanity in some kind of flame
            attacking not only you, but your country, and who knows what else.

            Sorry if I don't follow suit by attacking your country. AFAIK, there are
            many good people in Norway whom I don't wish to offend.

            But the FAQ, does address this issue. Please take a look at the FAQ before
            replying. I believe you might find the discussion enlightening.
            --
            p->m == (*p).m == p[0].m

            Modernize your infrastructure with SUSE Linux Enterprise servers, cloud technology for IaaS, and SUSE's software-defined...

            Mozilla is the not-for-profit behind the lightning fast Firefox browser. We put people over profit to give everyone more power online.

            Comment

            • Steven T. Hatton

              #21
              Re: [FAQ] Re: initialization vs assignment

              Alf P. Steinbach wrote:
              [color=blue]
              > * "Steven T. Hatton" <susudata@setid ava.kushan.aa> schriebt:[color=green]
              >>
              >> It seems to me 'Please read the FAQ before posting' could be taken as
              >> 'Please RTFFAQ'.[/color]
              >
              > Just spell it out: Read The Fucking Manual.
              >
              > With prudish & easily offended Americans (who, without noticing any of it,
              > offend all others not by their choice of words but by their actions) all
              > over the net, however, it is perhaps best not asserted in that form.
              >
              > It's a mystery to me how MIT could set up the RTFM site in the first
              > place, but then MIT has not only the best & brightest of the US
              > population, but also
              > many bright people from the rest of the world. I am quite sure that in
              > current Norway, striving to be more American than the Americans, something
              > like the RTFM could never have been set up. But then we no longer have
              > any
              > technical educational institutions left in Norway -- the miniature MIT
              > called NTH was, a few years ago, subsumed by a humanities oriented
              > university.
              >[/color]

              It's not the idea of pointing people to the FAQ that I was addressing. It
              was the confrontational undercurrent that seems to lie just below the
              surface. Say the wrong thing on the newsgroup and the next thing you know,
              you'll have someone going berserk and using profanity in some kind of flame
              attacking not only you, but your country, and who knows what else.

              Sorry if I don't follow suit by attacking your country. AFAIK, there are
              many good people in Norway whom I don't wish to offend.

              But the FAQ, does address this issue. Please take a look at the FAQ before
              replying. I believe you might find the discussion enlightening.
              --
              p->m == (*p).m == p[0].m

              Modernize your infrastructure with SUSE Linux Enterprise servers, cloud technology for IaaS, and SUSE's software-defined...

              Mozilla is the not-for-profit behind the lightning fast Firefox browser. We put people over profit to give everyone more power online.

              Comment

              • Alf P. Steinbach

                #22
                Re: [FAQ] Re: initialization vs assignment

                * "Steven T. Hatton" <susudata@setid ava.kushan.aa> schriebt:[color=blue]
                > Alf P. Steinbach wrote:
                >[color=green]
                > > * "Steven T. Hatton" <susudata@setid ava.kushan.aa> schriebt:[color=darkred]
                > >>
                > >> It seems to me 'Please read the FAQ before posting' could be taken as
                > >> 'Please RTFFAQ'.[/color]
                > >
                > > Just spell it out: Read The Fucking Manual.
                > >
                > > With prudish & easily offended Americans (who, without noticing any of it,
                > > offend all others not by their choice of words but by their actions) all
                > > over the net, however, it is perhaps best not asserted in that form.
                > >
                > > It's a mystery to me how MIT could set up the RTFM site in the first
                > > place, but then MIT has not only the best & brightest of the US
                > > population, but also
                > > many bright people from the rest of the world. I am quite sure that in
                > > current Norway, striving to be more American than the Americans, something
                > > like the RTFM could never have been set up. But then we no longer have
                > > any
                > > technical educational institutions left in Norway -- the miniature MIT
                > > called NTH was, a few years ago, subsumed by a humanities oriented
                > > university.
                > >[/color]
                >
                > It's not the idea of pointing people to the FAQ that I was addressing. It
                > was the confrontational undercurrent that seems to lie just below the
                > surface. Say the wrong thing on the newsgroup and the next thing you know,
                > you'll have someone going berserk and using profanity in some kind of flame
                > attacking not only you, but your country, and who knows what else.[/color]

                Hah, one should never needlessly limit an attack to person and country, as I
                am sure your mother told you.

                [color=blue]
                > Sorry if I don't follow suit by attacking your country. AFAIK, there are
                > many good people in Norway whom I don't wish to offend.[/color]

                Yada yada yada, "AFAIK there are many good negroes, jews, japs, frogs, etc.,
                and one of my best friends is a lesbian". Actually there are. One of the
                nice things about Norway is the humanitarian outlook (it's nice in general,
                but as commented earlier not so good with respect to technical education).
                E.g. we were early (1981) with having a female prime minister (Gro Harlem
                Brundtland, <url: http://tinyurl.com/26x63>); then a female and lesbian
                minister of justice (Anne Holt, who now mainly writes detective novels, <url:
                http://tinyurl.com/34uby>, <url: http://tinyurl.com/yuqcc>), and currently a
                male homosexual minister of economy (Per-Kristian Foss, <url:
                http://tinyurl.com/3fsdm>) with a priest (Kjell Magne Bondevik, <url:
                http://tinyurl.com/2azkv>) as prime minister -- we're simply not bigots, we
                don't have that in us, but look at the US... When is the first lesbian
                president or even member of Congress expected in the US? Never, I think;
                and to take but one little example from current political debate, note that
                in Per-Kristian Foss' official CV (from the Norwegian government), referred
                above, he lives in a registered partnership -- when is that in the US?

                [color=blue]
                > But the FAQ, does address this issue. Please take a look at the FAQ before
                > replying. I believe you might find the discussion enlightening.[/color]

                RTFM on topicality.

                --
                A: Because it messes up the order in which people normally read text.
                Q: Why is top-posting such a bad thing?
                A: Top-posting.
                Q: What is the most annoying thing on usenet and in e-mail?

                Comment

                • Alf P. Steinbach

                  #23
                  Re: [FAQ] Re: initialization vs assignment

                  * "Steven T. Hatton" <susudata@setid ava.kushan.aa> schriebt:[color=blue]
                  > Alf P. Steinbach wrote:
                  >[color=green]
                  > > * "Steven T. Hatton" <susudata@setid ava.kushan.aa> schriebt:[color=darkred]
                  > >>
                  > >> It seems to me 'Please read the FAQ before posting' could be taken as
                  > >> 'Please RTFFAQ'.[/color]
                  > >
                  > > Just spell it out: Read The Fucking Manual.
                  > >
                  > > With prudish & easily offended Americans (who, without noticing any of it,
                  > > offend all others not by their choice of words but by their actions) all
                  > > over the net, however, it is perhaps best not asserted in that form.
                  > >
                  > > It's a mystery to me how MIT could set up the RTFM site in the first
                  > > place, but then MIT has not only the best & brightest of the US
                  > > population, but also
                  > > many bright people from the rest of the world. I am quite sure that in
                  > > current Norway, striving to be more American than the Americans, something
                  > > like the RTFM could never have been set up. But then we no longer have
                  > > any
                  > > technical educational institutions left in Norway -- the miniature MIT
                  > > called NTH was, a few years ago, subsumed by a humanities oriented
                  > > university.
                  > >[/color]
                  >
                  > It's not the idea of pointing people to the FAQ that I was addressing. It
                  > was the confrontational undercurrent that seems to lie just below the
                  > surface. Say the wrong thing on the newsgroup and the next thing you know,
                  > you'll have someone going berserk and using profanity in some kind of flame
                  > attacking not only you, but your country, and who knows what else.[/color]

                  Hah, one should never needlessly limit an attack to person and country, as I
                  am sure your mother told you.

                  [color=blue]
                  > Sorry if I don't follow suit by attacking your country. AFAIK, there are
                  > many good people in Norway whom I don't wish to offend.[/color]

                  Yada yada yada, "AFAIK there are many good negroes, jews, japs, frogs, etc.,
                  and one of my best friends is a lesbian". Actually there are. One of the
                  nice things about Norway is the humanitarian outlook (it's nice in general,
                  but as commented earlier not so good with respect to technical education).
                  E.g. we were early (1981) with having a female prime minister (Gro Harlem
                  Brundtland, <url: http://tinyurl.com/26x63>); then a female and lesbian
                  minister of justice (Anne Holt, who now mainly writes detective novels, <url:
                  http://tinyurl.com/34uby>, <url: http://tinyurl.com/yuqcc>), and currently a
                  male homosexual minister of economy (Per-Kristian Foss, <url:
                  http://tinyurl.com/3fsdm>) with a priest (Kjell Magne Bondevik, <url:
                  http://tinyurl.com/2azkv>) as prime minister -- we're simply not bigots, we
                  don't have that in us, but look at the US... When is the first lesbian
                  president or even member of Congress expected in the US? Never, I think;
                  and to take but one little example from current political debate, note that
                  in Per-Kristian Foss' official CV (from the Norwegian government), referred
                  above, he lives in a registered partnership -- when is that in the US?

                  [color=blue]
                  > But the FAQ, does address this issue. Please take a look at the FAQ before
                  > replying. I believe you might find the discussion enlightening.[/color]

                  RTFM on topicality.

                  --
                  A: Because it messes up the order in which people normally read text.
                  Q: Why is top-posting such a bad thing?
                  A: Top-posting.
                  Q: What is the most annoying thing on usenet and in e-mail?

                  Comment

                  • Steven T. Hatton

                    #24
                    OT: Re: [FAQ] Re: initialization vs assignment

                    Alf P. Steinbach wrote:
                    [color=blue]
                    > RTFM on topicality.[/color]
                    I trust you can find a Norwegian translation of the Hávamál by starting
                    here: http://www.forn-sed.no/main/nynorsk/informasjon.htm

                    From the Old Norse:

                    9. Sá er sæll
                    er sjálfr of á
                    lof ok vit, meðan lifir;
                    því at ill ráð
                    hefr maðr oft þegit
                    annars brjóstum ór.

                    10. Byrði betri
                    berr-at maðr brautu at
                    en sé mannvit mikit;
                    auði betra
                    þykkir þat í ókunnum stað;
                    slíkt er válaðs vera.

                    11. Byrði betri
                    berr-at maðr brautu at
                    en sé mannvit mikit;
                    vegnest verra
                    vegr-a hann velli at
                    en sé ofdrykkja öls.

                    12. Er-a svá gótt
                    sem gótt kveða
                    öl alda sonum,
                    því at færa veit
                    er fleira drekkr
                    síns til geðs gumi.

                    13. Óminnishegri heitir
                    sá er yfir ölðrum þrumir;
                    hann stelr geði guma;
                    þess fugls fjöðrum
                    ek fjötraðr vark
                    í garði Gunnlaðar.
                    --
                    p->m == (*p).m == p[0].m

                    Modernize your infrastructure with SUSE Linux Enterprise servers, cloud technology for IaaS, and SUSE's software-defined...

                    Mozilla is the not-for-profit behind the lightning fast Firefox browser. We put people over profit to give everyone more power online.

                    Comment

                    • Steven T. Hatton

                      #25
                      OT: Re: [FAQ] Re: initialization vs assignment

                      Alf P. Steinbach wrote:
                      [color=blue]
                      > RTFM on topicality.[/color]
                      I trust you can find a Norwegian translation of the Hávamál by starting
                      here: http://www.forn-sed.no/main/nynorsk/informasjon.htm

                      From the Old Norse:

                      9. Sá er sæll
                      er sjálfr of á
                      lof ok vit, meðan lifir;
                      því at ill ráð
                      hefr maðr oft þegit
                      annars brjóstum ór.

                      10. Byrði betri
                      berr-at maðr brautu at
                      en sé mannvit mikit;
                      auði betra
                      þykkir þat í ókunnum stað;
                      slíkt er válaðs vera.

                      11. Byrði betri
                      berr-at maðr brautu at
                      en sé mannvit mikit;
                      vegnest verra
                      vegr-a hann velli at
                      en sé ofdrykkja öls.

                      12. Er-a svá gótt
                      sem gótt kveða
                      öl alda sonum,
                      því at færa veit
                      er fleira drekkr
                      síns til geðs gumi.

                      13. Óminnishegri heitir
                      sá er yfir ölðrum þrumir;
                      hann stelr geði guma;
                      þess fugls fjöðrum
                      ek fjötraðr vark
                      í garði Gunnlaðar.
                      --
                      p->m == (*p).m == p[0].m

                      Modernize your infrastructure with SUSE Linux Enterprise servers, cloud technology for IaaS, and SUSE's software-defined...

                      Mozilla is the not-for-profit behind the lightning fast Firefox browser. We put people over profit to give everyone more power online.

                      Comment

                      • Alf P. Steinbach

                        #26
                        Re: OT: Re: [FAQ] Re: initialization vs assignment

                        * "Steven T. Hatton" <susudata@setid ava.kushan.aa> schriebt:[color=blue]
                        >
                        > I trust you can find a Norwegian translation of the Hávamál[/color]

                        The English translation is actually more understandable.

                        Have you considered verses 1 through 8, not just 9 through 13? ;-)

                        Seriously, please don't more times suggest that the ordinary and polite
                        way to steer someone to the FAQ -- as Victor did -- is equivalent to
                        RTFFAQ. What you did there was to break two rules for visitors to the
                        house. Hinting (it seemed like) about Victor's motives, like "so you
                        really meant [bad thing]", and second, like "your customs are ungood".

                        Now I've tried both humor, low-intensity flaming and simple explanation.

                        I should perhaps have tried the last first, but done is done.


                        Cheers,

                        - Alf

                        --
                        A: Because it messes up the order in which people normally read text.
                        Q: Why is top-posting such a bad thing?
                        A: Top-posting.
                        Q: What is the most annoying thing on usenet and in e-mail?

                        Comment

                        • Alf P. Steinbach

                          #27
                          Re: OT: Re: [FAQ] Re: initialization vs assignment

                          * "Steven T. Hatton" <susudata@setid ava.kushan.aa> schriebt:[color=blue]
                          >
                          > I trust you can find a Norwegian translation of the Hávamál[/color]

                          The English translation is actually more understandable.

                          Have you considered verses 1 through 8, not just 9 through 13? ;-)

                          Seriously, please don't more times suggest that the ordinary and polite
                          way to steer someone to the FAQ -- as Victor did -- is equivalent to
                          RTFFAQ. What you did there was to break two rules for visitors to the
                          house. Hinting (it seemed like) about Victor's motives, like "so you
                          really meant [bad thing]", and second, like "your customs are ungood".

                          Now I've tried both humor, low-intensity flaming and simple explanation.

                          I should perhaps have tried the last first, but done is done.


                          Cheers,

                          - Alf

                          --
                          A: Because it messes up the order in which people normally read text.
                          Q: Why is top-posting such a bad thing?
                          A: Top-posting.
                          Q: What is the most annoying thing on usenet and in e-mail?

                          Comment

                          • Alf P. Steinbach

                            #28
                            Re: OT: Re: [FAQ] Re: initialization vs assignment

                            PS: My information about the US Congress turned out to be out of date.
                            It actually had Tammy Baldwin in 1998. So my guess was partially
                            incorrect.

                            --
                            A: Because it messes up the order in which people normally read text.
                            Q: Why is top-posting such a bad thing?
                            A: Top-posting.
                            Q: What is the most annoying thing on usenet and in e-mail?

                            Comment

                            • Alf P. Steinbach

                              #29
                              Re: OT: Re: [FAQ] Re: initialization vs assignment

                              PS: My information about the US Congress turned out to be out of date.
                              It actually had Tammy Baldwin in 1998. So my guess was partially
                              incorrect.

                              --
                              A: Because it messes up the order in which people normally read text.
                              Q: Why is top-posting such a bad thing?
                              A: Top-posting.
                              Q: What is the most annoying thing on usenet and in e-mail?

                              Comment

                              • Steven T. Hatton

                                #30
                                Re: OT: Re: [FAQ] Re: initialization vs assignment

                                Alf P. Steinbach wrote:
                                [color=blue]
                                > * "Steven T. Hatton" <susudata@setid ava.kushan.aa> schriebt:[color=green]
                                >>
                                >> I trust you can find a Norwegian translation of the Hávamál[/color]
                                >
                                > The English translation is actually more understandable.[/color]

                                They all seem lacking to me. I prefer the Old Norse.
                                [color=blue]
                                > Have you considered verses 1 through 8, not just 9 through 13? ;-)[/color]

                                Certainly, but they didn't seem as apropos.
                                [color=blue]
                                > Seriously, please don't more times suggest that the ordinary and polite
                                > way to steer someone to the FAQ -- as Victor did -- is equivalent to
                                > RTFFAQ.[/color]

                                I didn't say it was equivalent. I said it might be taken that way.
                                [color=blue]
                                > What you did there was to break two rules for visitors to the
                                > house. Hinting (it seemed like) about Victor's motives, like "so you
                                > really meant [bad thing]", and second, like "your customs are ungood".[/color]

                                I still don't fully understand /why/ m_x(x) works in the following:

                                #include <iostream>

                                class A {
                                int m_x;
                                public:
                                A(int x):m_x(x){};
                                int getX(){return m_x; };
                                };

                                int main(int argc, char* argv[]) {
                                A a(5);
                                std::cout << a.getX() << std::endl;
                                }
                                [color=blue]
                                > Now I've tried both humor, low-intensity flaming and simple explanation.
                                >
                                > I should perhaps have tried the last first, but done is done.
                                >
                                >
                                > Cheers,
                                >
                                > - Alf[/color]

                                What Gore really meant when he pointed to his work with the Internet was not
                                that he invented the Internet - which he never said - but that he did a lot
                                to popularize it, and disseminate information about the use of web browsers
                                to people in prominant and influential positions. I set up the systems he
                                use to do it.


                                --
                                p->m == (*p).m == p[0].m

                                Modernize your infrastructure with SUSE Linux Enterprise servers, cloud technology for IaaS, and SUSE's software-defined...

                                Mozilla is the not-for-profit behind the lightning fast Firefox browser. We put people over profit to give everyone more power online.

                                Comment

                                Working...