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. A programming question!

A programming question!

Scheduled Pinned Locked Moved The Lounge
question
24 Posts 18 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.
  • D dandy72

    PIEBALDconsult wrote:

    But, if I have a kludgey Method I intend to rework at some convenient future time, I want to be reminded about it every time I compile code which calls it.

    OMG. No. Is there ever any code you don't intend to rework? Over time my code would evolve into endless warnings every time I compiled it. Until I turn it off, making it completely pointless.

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

    Sure, yet some are worse than others, or at least some times I know what I want to do when I have the time.

    1 Reply Last reply
    0
    • P PIEBALDconsult

      (I broach this subject here because I don't think there's an answer. Note the "rant" icon.) Consider: ObsoleteAttribute -- Marks the program elements that are no longer in use. What would be the opposite/complement? A way to mark some code as not-yet-ready-for-primetime? Not to the extent of throwing a NotImplementedException, because the code exists and works (mostly). Not a todo either; that's too passive. But, if I have a kludgey Method I intend to rework at some convenient future time, I want to be reminded about it every time I compile code which calls it. Even if the Method has been compiled into a DLL. An ObsoleteAttribute will do this -- but I expect that it would be confusing to my colleagues. Even a UseAtYourOwnRiskAttribute would be better.

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

      I use #warning directives in my C# for this. Their messages show in every compile including product builds, so I can't forget things that need to be reviewed. It's nagging without being obstructive.

      Software Zen: delete this;

      P 1 Reply Last reply
      0
      • G Gary R Wheeler

        I use #warning directives in my C# for this. Their messages show in every compile including product builds, so I can't forget things that need to be reviewed. It's nagging without being obstructive.

        Software Zen: delete this;

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

        Even when referencing something in a DLL?

        G 1 Reply Last reply
        0
        • P PIEBALDconsult

          Even when referencing something in a DLL?

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

          For developing at my desk, the warning message is only issued when compiling the DLL, obviously. Our automated build process builds all parts of the product from source which causes the warnings to be in the build log. Both results are sufficient to help me keep track of items for later changes. The exceptions to both of these cases are third-party libraries supplied without source code. We use several of those to control hardware we buy off-the-shelf.

          Software Zen: delete this;

          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