Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Language + ? = BFF

Language + ? = BFF

Scheduled Pinned Locked Moved The Lounge
csharpc++javagraphicstutorial
44 Posts 13 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Single Step Debugger

    What single structure or specific operator better defines a given language? As an example, I was thinking of: C * C++ - vector C# - List Java - arrays Any other languages or thoughts?

    There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.

    G Offline
    G Offline
    Gary R Wheeler
    wrote on last edited by
    #12

    My favorite .NET data structure is Dictionary<_T_> hands down. I always found the C++ equivalents (STL's map and MFC's CMap) somewhat klunkier, mostly because of the template usage and resultant inscrutable compiler diagnostics.

    Software Zen: delete this;

    S P 2 Replies Last reply
    0
    • D David ONeil

      vector for C++ just isn't the right choice, and indicates you are using C++ like C. virtual and template are both far better choices. Depending upon how you use the language, both of them can be supported with valid arguments, so I don't think either of them can be realistically picked over the other. If you don't understand virtual, see the C++ tutorial in my sig. If you don't understand template, just see any of honey the codewitch's work. C++ becomes magic.

      Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver

      S Offline
      S Offline
      Single Step Debugger
      wrote on last edited by
      #13

      I wouldn't associate C++ with "virtual". Sure, it's a big part of the language concept, but not defines it. "Virtual" better fits with Java where everything is "virtual" by default. As for the templates, even C++ doesn't fully understand templates - at least until runtime. :) If you don't understand what I mean, think of separate template implementation and declaration. I know it's doable, but it doesn't feel natural.

      There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.

      D 1 Reply Last reply
      0
      • P PIEBALDconsult

        C *
        C++ *
        C# .
        Java a large mug and lots of sugar

        Edit

        BASIC LET

        J Offline
        J Offline
        jmaida
        wrote on last edited by
        #14

        My first take on programming language identifiers (not exhaustive by any means) C * C++ * COBOL ADD COBOL PIC FORTRAN do ALGOL begin PL/I BEGIN GO func

        "A little time, a little trouble, your better day" Badfinger

        1 Reply Last reply
        0
        • G Gary R Wheeler

          My favorite .NET data structure is Dictionary<_T_> hands down. I always found the C++ equivalents (STL's map and MFC's CMap) somewhat klunkier, mostly because of the template usage and resultant inscrutable compiler diagnostics.

          Software Zen: delete this;

          S Offline
          S Offline
          Single Step Debugger
          wrote on last edited by
          #15

          Yes, Dictionary is verry powerful when you search by key as it gives you O (log N) search, no duplications, ets. But if we go this path then DataTable is even more interesting. I also don't like how you can shoot yourself in the leg with the STL map. One assignment with missing reference operator and you are working with old data/copy.

          There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.

          0 1 Reply Last reply
          0
          • S Single Step Debugger

            I wouldn't associate C++ with "virtual". Sure, it's a big part of the language concept, but not defines it. "Virtual" better fits with Java where everything is "virtual" by default. As for the templates, even C++ doesn't fully understand templates - at least until runtime. :) If you don't understand what I mean, think of separate template implementation and declaration. I know it's doable, but it doesn't feel natural.

            There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.

            D Offline
            D Offline
            David ONeil
            wrote on last edited by
            #16

            So the word you are looking for is class. Not vector. :doh:

            Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver

            S 1 Reply Last reply
            0
            • P PIEBALDconsult

              No generics in v1. System.String is dreadful, the unavoidability of immutability is a very short-sighted (ivory tower) idea. They had to include StringBuilder just to make things work. It would be better for strings to be mutable by default and then be able to set them as immutable later as needed -- mystring.AsReadOnly() or mystring.ReadOnly = true Bleah, ptui. :mad:

              OriginalGriffO Offline
              OriginalGriffO Offline
              OriginalGriff
              wrote on last edited by
              #17

              And no vector in C++ V1 either ... languages improve! :laugh: But string isn't too bad - it's not perfect, but it is way, way better than the char* / const char * mess that preceded it.

              "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

              "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
              "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

              P 1 Reply Last reply
              0
              • D David ONeil

                So the word you are looking for is class. Not vector. :doh:

                Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver

                S Offline
                S Offline
                Single Step Debugger
                wrote on last edited by
                #18

                Again, not verry C++ specific. Same for structures.

                There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.

                D 1 Reply Last reply
                0
                • S Single Step Debugger

                  Again, not verry C++ specific. Same for structures.

                  There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.

                  D Offline
                  D Offline
                  David ONeil
                  wrote on last edited by
                  #19

                  Quote:

                  What single structure or specific operator better defines a given language?

                  That was your question. template, virtual, and class are all better answers than vector. In fact, vector is an idiotic answer to that specific question. Especially since vector isn't a structure or operator. :doh: :doh: :doh: Of course, neither are the items I've given, but they do define the language.

                  Our Forgotten Astronomy | Object Oriented Programming with C++ | Wordle solver

                  S 1 Reply Last reply
                  0
                  • S Single Step Debugger

                    What single structure or specific operator better defines a given language? As an example, I was thinking of: C * C++ - vector C# - List Java - arrays Any other languages or thoughts?

                    There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.

                    M Offline
                    M Offline
                    megaadam
                    wrote on last edited by
                    #20

                    I would've said Java class Object But on the other hand I must admit that, when it comes to Java for me personally, a ten-foot-pole aint long enough :cool:

                    "If we don't change direction, we'll end up where we're going"

                    1 Reply Last reply
                    0
                    • OriginalGriffO OriginalGriff

                      And no vector in C++ V1 either ... languages improve! :laugh: But string isn't too bad - it's not perfect, but it is way, way better than the char* / const char * mess that preceded it.

                      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

                      P Offline
                      P Offline
                      PIEBALDconsult
                      wrote on last edited by
                      #21

                      OriginalGriff wrote:

                      languages improve

                      Then it's not the same language.

                      1 Reply Last reply
                      0
                      • S Single Step Debugger

                        Yes, Dictionary is verry powerful when you search by key as it gives you O (log N) search, no duplications, ets. But if we go this path then DataTable is even more interesting. I also don't like how you can shoot yourself in the leg with the STL map. One assignment with missing reference operator and you are working with old data/copy.

                        There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.

                        0 Offline
                        0 Offline
                        0x01AA
                        wrote on last edited by
                        #22

                        STL map is pretty ok, but you need to know how to use it....

                        S 1 Reply Last reply
                        0
                        • OriginalGriffO OriginalGriff

                          Python: a tab and three spaces just to annoy people.

                          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

                          P Offline
                          P Offline
                          PIEBALDconsult
                          wrote on last edited by
                          #23

                          How big is the tab? Like a bar tab?

                          1 Reply Last reply
                          0
                          • G Gary R Wheeler

                            My favorite .NET data structure is Dictionary<_T_> hands down. I always found the C++ equivalents (STL's map and MFC's CMap) somewhat klunkier, mostly because of the template usage and resultant inscrutable compiler diagnostics.

                            Software Zen: delete this;

                            P Offline
                            P Offline
                            PIEBALDconsult
                            wrote on last edited by
                            #24

                            enums are also way better in .net languages.

                            0 1 Reply Last reply
                            0
                            • S Single Step Debugger

                              What single structure or specific operator better defines a given language? As an example, I was thinking of: C * C++ - vector C# - List Java - arrays Any other languages or thoughts?

                              There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.

                              A Offline
                              A Offline
                              Amarnath S
                              wrote on last edited by
                              #25

                              Javascript - "undefined". :-)

                              P 1 Reply Last reply
                              0
                              • S Single Step Debugger

                                What single structure or specific operator better defines a given language? As an example, I was thinking of: C * C++ - vector C# - List Java - arrays Any other languages or thoughts?

                                There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.

                                H Offline
                                H Offline
                                honey the codewitch
                                wrote on last edited by
                                #26

                                C++ for me would be template I don't really use the STL that much due to working with tiny amounts of RAM.

                                To err is human. Fortune favors the monsters.

                                S 1 Reply Last reply
                                0
                                • OriginalGriffO OriginalGriff

                                  Python: a tab and three spaces just to annoy people.

                                  "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

                                  V Offline
                                  V Offline
                                  Vikram A Punathambekar
                                  wrote on last edited by
                                  #27

                                  Python 3 doesn't allow mixing tabs and spaces though :) But I really wish they had gone with tabs as the preferred option rather than spaces X|

                                  Cheers, Vikram.

                                  P 1 Reply Last reply
                                  0
                                  • S Single Step Debugger

                                    What single structure or specific operator better defines a given language? As an example, I was thinking of: C * C++ - vector C# - List Java - arrays Any other languages or thoughts?

                                    There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.

                                    K Offline
                                    K Offline
                                    kmoorevs
                                    wrote on last edited by
                                    #28

                                    Basic = Dim! :laugh:

                                    "Go forth into the source" - Neal Morse "Hope is contagious"

                                    1 Reply Last reply
                                    0
                                    • V Vikram A Punathambekar

                                      Python 3 doesn't allow mixing tabs and spaces though :) But I really wish they had gone with tabs as the preferred option rather than spaces X|

                                      Cheers, Vikram.

                                      P Offline
                                      P Offline
                                      PIEBALDconsult
                                      wrote on last edited by
                                      #29

                                      Maybe there should be an option, perhaps something like strict.

                                      1 Reply Last reply
                                      0
                                      • A Amarnath S

                                        Javascript - "undefined". :-)

                                        P Offline
                                        P Offline
                                        PIEBALDconsult
                                        wrote on last edited by
                                        #30

                                        Visual Basic -- nothing Mmm, yeah, quite literally.

                                        1 Reply Last reply
                                        0
                                        • P PIEBALDconsult

                                          enums are also way better in .net languages.

                                          0 Offline
                                          0 Offline
                                          0x01AA
                                          wrote on last edited by
                                          #31

                                          Sorry, the only language I know, which treats enum as enum is Modula2. All languages who allow to assign an enum item a individual value don't treat enum as enum and it should be forbidden that these languages missuse the a type called enum. ;)

                                          P 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups