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. Refactor code to use new C# language features

Refactor code to use new C# language features

Scheduled Pinned Locked Moved The Insider News
csharpcomhelpcode-review
5 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.
  • K Offline
    K Offline
    Kent Sharkey
    wrote on last edited by
    #1

    Jet Brains[^]:

    Modernizing, or migrating to modern language features in any language can help make code more readable, efficient and secure. In this blog post, we’ll look at ways to modernize code so it’s better than before.

    Time to redecorate

    The actual mechanisms might be ReSharper-specific, but the concepts aren't Edit: forgot the blurb before clicking post

    P realJSOPR Mike HankeyM 3 Replies Last reply
    0
    • K Kent Sharkey

      Jet Brains[^]:

      Modernizing, or migrating to modern language features in any language can help make code more readable, efficient and secure. In this blog post, we’ll look at ways to modernize code so it’s better than before.

      Time to redecorate

      The actual mechanisms might be ReSharper-specific, but the concepts aren't Edit: forgot the blurb before clicking post

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

      Romans go home! (I just felt like I hadn't said that recently.) Having said that... The old ways are the best ways. Don't use new features of anything unless they actually improve things.

      Kent Sharkey wrote:

      can help make code more readable, efficient and secure

      more readable -- Only if you know the new feature and don't know the old one. efficient -- I have never seen that, at least not runtime-efficient. Often "new" features are less runtime-efficient. They may make a poor developer more productive, churning out poorly-performing code more quickly. secure -- Definitely not. Unless it means that said poor developer can't break things as easily. Edit: Plus, refactoring often leads to bugs. If the existing code is "less readable" than the newer developers would like, then they must not touch it. "Progress for the sake of progress must be discouraged."

      Richard DeemingR 1 Reply Last reply
      0
      • P PIEBALDconsult

        Romans go home! (I just felt like I hadn't said that recently.) Having said that... The old ways are the best ways. Don't use new features of anything unless they actually improve things.

        Kent Sharkey wrote:

        can help make code more readable, efficient and secure

        more readable -- Only if you know the new feature and don't know the old one. efficient -- I have never seen that, at least not runtime-efficient. Often "new" features are less runtime-efficient. They may make a poor developer more productive, churning out poorly-performing code more quickly. secure -- Definitely not. Unless it means that said poor developer can't break things as easily. Edit: Plus, refactoring often leads to bugs. If the existing code is "less readable" than the newer developers would like, then they must not touch it. "Progress for the sake of progress must be discouraged."

        Richard DeemingR Offline
        Richard DeemingR Offline
        Richard Deeming
        wrote on last edited by
        #3

        PIEBALDconsult wrote:

        Often "new" features are less runtime-efficient.

        But definitely not always. For example, the new Span<T> / ReadOnlySpan<T> methods can drastically increase performance and reduce memory allocations - if you know what you're doing. :) If you've got a few hours spare, Stephen Toub posts some excellent long-form blogs on the performance improvements in various new versions of .NET: Performance Improvements in .NET Core - .NET Blog[^] Performance Improvements in .NET Core 2.1 - .NET Blog[^] Performance Improvements in .NET Core 3.0 - .NET Blog[^] Performance Improvements in .NET 5 - .NET Blog[^] Performance Improvements in .NET 6 - .NET Blog[^] Performance Improvements in .NET 7 - .NET Blog[^] Edit: Whoops! Just noticed the post below: The Insider News[^]


        "These people looked deep w

        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

        1 Reply Last reply
        0
        • K Kent Sharkey

          Jet Brains[^]:

          Modernizing, or migrating to modern language features in any language can help make code more readable, efficient and secure. In this blog post, we’ll look at ways to modernize code so it’s better than before.

          Time to redecorate

          The actual mechanisms might be ReSharper-specific, but the concepts aren't Edit: forgot the blurb before clicking post

          realJSOPR Offline
          realJSOPR Offline
          realJSOP
          wrote on last edited by
          #4

          Problem - this is extremely low-priority "technical debt", and a regression testing nightmare.Any project manager worth his salt would take heroic steps to avoid doing it.

          ".45 ACP - because shooting twice is just silly" - JSOP, 2010
          -----
          You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
          -----
          When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

          1 Reply Last reply
          0
          • K Kent Sharkey

            Jet Brains[^]:

            Modernizing, or migrating to modern language features in any language can help make code more readable, efficient and secure. In this blog post, we’ll look at ways to modernize code so it’s better than before.

            Time to redecorate

            The actual mechanisms might be ReSharper-specific, but the concepts aren't Edit: forgot the blurb before clicking post

            Mike HankeyM Offline
            Mike HankeyM Offline
            Mike Hankey
            wrote on last edited by
            #5

            Lipstick on a pig!

            PartsBin an Electronics Part Organizer is finally available for download. JaxCoder.com

            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