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. Other Discussions
  3. The Insider News
  4. How to Think About Variables in C

How to Think About Variables in C

Scheduled Pinned Locked Moved The Insider News
comperformancetutorial
6 Posts 5 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.
  • T Offline
    T Offline
    Terrence Dorsey
    wrote on last edited by
    #1

    denniskubes.com[^]:

    C is memory with syntactic sugar and as such it is helpful to think of things in C as starting from memory. One of the pieces that I think is often overlooked is variables and data types. If you have the right mental model for variables and data types it makes other concepts in C, and other langauages, easier.

    I absolutely love this: "C is memory with syntactic sugar."

    T L 2 Replies Last reply
    0
    • T Terrence Dorsey

      denniskubes.com[^]:

      C is memory with syntactic sugar and as such it is helpful to think of things in C as starting from memory. One of the pieces that I think is often overlooked is variables and data types. If you have the right mental model for variables and data types it makes other concepts in C, and other langauages, easier.

      I absolutely love this: "C is memory with syntactic sugar."

      T Offline
      T Offline
      Tom Clement
      wrote on last edited by
      #2

      The more interesting thing to me is the converse of what's written in this article. I feel like I'm missing something obvious, but how else would you think of a variable, in C or any other language? I'm not trying to be snide here. I'm honestly curious.

      Tom Clement articles[^]

      P P 2 Replies Last reply
      0
      • T Tom Clement

        The more interesting thing to me is the converse of what's written in this article. I feel like I'm missing something obvious, but how else would you think of a variable, in C or any other language? I'm not trying to be snide here. I'm honestly curious.

        Tom Clement articles[^]

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

        :thumbsup: 'Xactly.

        1 Reply Last reply
        0
        • T Terrence Dorsey

          denniskubes.com[^]:

          C is memory with syntactic sugar and as such it is helpful to think of things in C as starting from memory. One of the pieces that I think is often overlooked is variables and data types. If you have the right mental model for variables and data types it makes other concepts in C, and other langauages, easier.

          I absolutely love this: "C is memory with syntactic sugar."

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Another "C for Dummies" statement where a little obfuscation is just as good as elucidation.

          Peter Wasser Art is making something out of nothing and selling it. Frank Zappa

          1 Reply Last reply
          0
          • T Tom Clement

            The more interesting thing to me is the converse of what's written in this article. I feel like I'm missing something obvious, but how else would you think of a variable, in C or any other language? I'm not trying to be snide here. I'm honestly curious.

            Tom Clement articles[^]

            P Offline
            P Offline
            peterchen
            wrote on last edited by
            #5

            For example, a more functional definition of a type: The type defines the possible values as well as available operations. Which I find way more functional than "a number of bytes".

            ORDER BY what user wants

            T 1 Reply Last reply
            0
            • P peterchen

              For example, a more functional definition of a type: The type defines the possible values as well as available operations. Which I find way more functional than "a number of bytes".

              ORDER BY what user wants

              T Offline
              T Offline
              Tom Clement
              wrote on last edited by
              #6

              Ok, I guess I see that. But that seems more like metadata about the variable than the variable itself. Maybe my first job at a C compiler company is biasing me.

              Tom Clement articles[^]

              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