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. I love C where types are basically a suggestion rather than a rule

I love C where types are basically a suggestion rather than a rule

Scheduled Pinned Locked Moved The Lounge
data-structures
77 Posts 35 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.
  • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

    Everything is a pointer for your interpretation...

    "The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012

    J Offline
    J Offline
    James Lonero
    wrote on last edited by
    #68

    And when it breaks, everyone will be pointing at it.

    1 Reply Last reply
    0
    • B Bob1000

      "Make a change and watch it break and fix the break is the only way to understand ancient code." While looking for a new job!

      T Offline
      T Offline
      TheGreatAndPowerfulOz
      wrote on last edited by
      #69

      Well, I didn't say put it in production. But haha, that is a potentiality.

      #SupportHeForShe Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

      1 Reply Last reply
      0
      • E etkid84

        Hopefully people will come to their senses and switch from C# to Java, just saying.

        ~d~

        T Offline
        T Offline
        TheGreatAndPowerfulOz
        wrote on last edited by
        #70

        why would I want to take a giant leap backwards?

        #SupportHeForShe Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

        1 Reply Last reply
        0
        • D davecasdf

          And I thought it was age that caused that "southern migration" of my hair. Not much on my head any more, but I think my ankles are getting hairier.

          R Offline
          R Offline
          rjmoses
          wrote on last edited by
          #71

          Understand. I've been trying to figure out why I have more hair growing out of my ears and nose that I have growing out of the top of my head. Near as I can figure, it's because the testosterone pump isn't as strong as it used to be.

          D 1 Reply Last reply
          0
          • D David ONeil

            den2k88 wrote:

            C++ is ... hard to read and often very hard to write

            Am I using it wrong, because I've never had these problems?

            “If we get $100,000, we will go to Potato blockchain.” Enable the dream!

            R Offline
            R Offline
            rjmoses
            wrote on last edited by
            #72

            You're probably not using all the "features". I've been tripping through some code that I have to study each line for 10-15 minutes to figure out what it's doing. I hate it!

            D 1 Reply Last reply
            0
            • R rjmoses

              You're probably not using all the "features". I've been tripping through some code that I have to study each line for 10-15 minutes to figure out what it's doing. I hate it!

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

              My question: would it be understandable if it was rewritten using older features without the newfangled stuff, or is it only possible to do using the newfangled stuff? Can it be refactored to be easier to understand?

              “If we get $100,000, we will go to Potato blockchain.” Enable the dream!

              R 1 Reply Last reply
              0
              • D David ONeil

                My question: would it be understandable if it was rewritten using older features without the newfangled stuff, or is it only possible to do using the newfangled stuff? Can it be refactored to be easier to understand?

                “If we get $100,000, we will go to Potato blockchain.” Enable the dream!

                R Offline
                R Offline
                rjmoses
                wrote on last edited by
                #74

                No, in the case I am thinking about, it has to do with simple formatting so that the logic flow would be clear. It is a sequence of 30 or so if/elseif statements with embedded if's or if/elseif's with absolutely no indentation. Telling what elseif goes with what if is a pain in the patootie. But in other cases, I have seen lambdas embedded in templates which makes debugging old code very difficult on an easy day. My belief is simple: Code should be comprehensible for its intent and objective within a few seconds. Looking for matching braces, buried parens, etc. is very frustrating.

                1 Reply Last reply
                0
                • R rjmoses

                  Understand. I've been trying to figure out why I have more hair growing out of my ears and nose that I have growing out of the top of my head. Near as I can figure, it's because the testosterone pump isn't as strong as it used to be.

                  D Offline
                  D Offline
                  davecasdf
                  wrote on last edited by
                  #75

                  It's just gravity, stand on your head more. ( Of course, my brain cells have been going down hill for years now ... )

                  1 Reply Last reply
                  0
                  • H honey the codewitch

                    The cast operator is why I can cast my struct directly to an "array" of bytes and stash it in a file. It makes me happy. It's so elegant. So concise. And so dangerous.

                    Real programmers use butterflies

                    J Offline
                    J Offline
                    Jan Heckman
                    wrote on last edited by
                    #76

                    Love you for bringing this up. Spent my best years doing C, starting on Atari ST. Now I'm lazy and use C++ (up to a point). Much more productive, owing mostly to other people's work (ashamed). Long live piraCy!

                    H 1 Reply Last reply
                    0
                    • J Jan Heckman

                      Love you for bringing this up. Spent my best years doing C, starting on Atari ST. Now I'm lazy and use C++ (up to a point). Much more productive, owing mostly to other people's work (ashamed). Long live piraCy!

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

                      Technically I'm using C++ but I forget because it's on a microcontroller and no STL so I find myself doing more c-isms than anything. :)

                      Real programmers use butterflies

                      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