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. C# 7 looks interesting...

C# 7 looks interesting...

Scheduled Pinned Locked Moved The Lounge
csharpvisual-studiocom
14 Posts 8 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.
  • L Lost User

    Can't wait to have to maintain poorly written code that misuses all these shiny new "features". Fun times ahead of us all! :doh:

    “Thinking is the hardest work there is …”

    S Offline
    S Offline
    Super Lloyd
    wrote on last edited by
    #5

    Don't worry, one can already find poorly written aync, lambda and LINQ code today! ;P :-D

    A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

    V 1 Reply Last reply
    0
    • L Lost User

      Can't wait to have to maintain poorly written code that misuses all these shiny new "features". Fun times ahead of us all! :doh:

      “Thinking is the hardest work there is …”

      D Offline
      D Offline
      den2k88
      wrote on last edited by
      #6

      I understand your pain! :thumbsup:

      GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++*      Weapons extension: ma- k++ F+2 X If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani

      1 Reply Last reply
      0
      • S Super Lloyd

        What's New in C# 7.0 | .NET Blog[^] And Visual Studio "15" Preview 4 | The Visual Studio Blog[^] is much leaner! only 500 MB (instead of 6GB for minimal VS2015 installation) Woop woop! :)

        A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

        D Offline
        D Offline
        Dan Neely
        wrote on last edited by
        #7

        Initial gut call reactions... The current out syntax is klunky, but hiding variable declarations like that is even worse. X| X| X| The out * for "I don't care" is worrying since it will encourage bad behavior by people who're lazy/don't understand what they're doing. Yeah ignoring return variables is a problem now; but I don't think encouraging it is a good idea in the general case. It might make some things like the cluster elephants that are MS Office COM wrappers less painful to use; but the core problem is that the API is a cluster elephant not the language syntax around calling it. :thumbsdown: Type pattern matching, the initial trivial cases are rather pointless IMO (and whoever decided it was OK to combine an if and then on a single line should be force fed his keyboard); but making switches easier to use and more flexible is cool. :thumbsup: The new tuple return feature looks awesome. :thumbsup::thumbsup: Deconstructing it into separate variables when there's no innate reason to keep them bound after the call (eg returning a computation result and any errors/warnings reported by the computation) means I can have my cake and eat it too. :thumbsup::thumbsup::thumbsup: I'm not so sure about general type deconstruction. On the one hand it's just syntactic sugar, on the other my gut reaction is that it could probably be abused horribly somehow. :thumbsup::thumbsdown: Wild cards in tuple deconstruction trigger the same mixed reaction as with wildcard out parameters and deconstructing normal objects. :thumbsup::thumbsdown: Local functions. I missed these many years ago when transitioning from Pascal to C++; now I feel like they're just adding an extra layer of code hiding to no real gain. :thumbsdown: Allowing _'s in numerical literals to improve readability. Looks like a nice minor usability gain with no real downside. :thumbsup: Ref returns are probably a good idea overall; but requiring devs who've never had to think in terms of pointer-fun to deal with stuff like this might cause confusion. :thumbsup: Generalized async types. Sounds like a good idea, but since I haven't done any greenfield dev with an opportunity to experiment with async I don't feel comfortable making a judgement call here. :thumbsup::thumbsdown: More expression bodies takes the fugliest thing in C#6 and smears it over more of the language like a roomba confronted by a fresh turd

        K 1 Reply Last reply
        0
        • S Super Lloyd

          Don't worry, one can already find poorly written aync, lambda and LINQ code today! ;P :-D

          A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

          V Offline
          V Offline
          Vark111
          wrote on last edited by
          #8

          You can go even further back than that. I still regularly see var abuse. :(

          J 1 Reply Last reply
          0
          • S Super Lloyd

            What's New in C# 7.0 | .NET Blog[^] And Visual Studio "15" Preview 4 | The Visual Studio Blog[^] is much leaner! only 500 MB (instead of 6GB for minimal VS2015 installation) Woop woop! :)

            A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

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

            Super Lloyd wrote:

            only 500 MB (instead of 6GB for minimal VS2015 installation)

            ... that's because all but fancy text editor functionality will be in extensions and/or NuGet-s :)

            1 Reply Last reply
            0
            • V Vark111

              You can go even further back than that. I still regularly see var abuse. :(

              J Offline
              J Offline
              jtmueller
              wrote on last edited by
              #10

              There is no such thing as "var abuse".

              1 Reply Last reply
              0
              • D Dan Neely

                Initial gut call reactions... The current out syntax is klunky, but hiding variable declarations like that is even worse. X| X| X| The out * for "I don't care" is worrying since it will encourage bad behavior by people who're lazy/don't understand what they're doing. Yeah ignoring return variables is a problem now; but I don't think encouraging it is a good idea in the general case. It might make some things like the cluster elephants that are MS Office COM wrappers less painful to use; but the core problem is that the API is a cluster elephant not the language syntax around calling it. :thumbsdown: Type pattern matching, the initial trivial cases are rather pointless IMO (and whoever decided it was OK to combine an if and then on a single line should be force fed his keyboard); but making switches easier to use and more flexible is cool. :thumbsup: The new tuple return feature looks awesome. :thumbsup::thumbsup: Deconstructing it into separate variables when there's no innate reason to keep them bound after the call (eg returning a computation result and any errors/warnings reported by the computation) means I can have my cake and eat it too. :thumbsup::thumbsup::thumbsup: I'm not so sure about general type deconstruction. On the one hand it's just syntactic sugar, on the other my gut reaction is that it could probably be abused horribly somehow. :thumbsup::thumbsdown: Wild cards in tuple deconstruction trigger the same mixed reaction as with wildcard out parameters and deconstructing normal objects. :thumbsup::thumbsdown: Local functions. I missed these many years ago when transitioning from Pascal to C++; now I feel like they're just adding an extra layer of code hiding to no real gain. :thumbsdown: Allowing _'s in numerical literals to improve readability. Looks like a nice minor usability gain with no real downside. :thumbsup: Ref returns are probably a good idea overall; but requiring devs who've never had to think in terms of pointer-fun to deal with stuff like this might cause confusion. :thumbsup: Generalized async types. Sounds like a good idea, but since I haven't done any greenfield dev with an opportunity to experiment with async I don't feel comfortable making a judgement call here. :thumbsup::thumbsdown: More expression bodies takes the fugliest thing in C#6 and smears it over more of the language like a roomba confronted by a fresh turd

                K Offline
                K Offline
                kdmote
                wrote on last edited by
                #11

                I'm not sure I share your disdain for expression bodies. Used with discipline and restraint, I think they can provide a welcom compression of otherwise wasted space (thus improving readability). I site this source as an example of what I consider appropriate usage. Can you point to some examples of egregious usages?

                D 1 Reply Last reply
                0
                • K kdmote

                  I'm not sure I share your disdain for expression bodies. Used with discipline and restraint, I think they can provide a welcom compression of otherwise wasted space (thus improving readability). I site this source as an example of what I consider appropriate usage. Can you point to some examples of egregious usages?

                  D Offline
                  D Offline
                  Dan Neely
                  wrote on last edited by
                  #12

                  I could start with the first 3 examples in your link (and presumably the rest but I didn't bother to keep reading). They were hideous the first time I saw them and haven't improved with age.

                  Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                  K 1 Reply Last reply
                  0
                  • D Dan Neely

                    I could start with the first 3 examples in your link (and presumably the rest but I didn't bother to keep reading). They were hideous the first time I saw them and haven't improved with age.

                    Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                    K Offline
                    K Offline
                    kdmote
                    wrote on last edited by
                    #13

                    That's interesting. From my perspective, in those examples I see the "old way" kind of like an old man with a wise brow and pulseless heart, waging all things in the balance of reason, whereas the "new way" seems more like a beautiful maiden, full of fire, with a burning heart and flaming soul. But perhaps that's just the Topelius in me. :)

                    D 1 Reply Last reply
                    0
                    • K kdmote

                      That's interesting. From my perspective, in those examples I see the "old way" kind of like an old man with a wise brow and pulseless heart, waging all things in the balance of reason, whereas the "new way" seems more like a beautiful maiden, full of fire, with a burning heart and flaming soul. But perhaps that's just the Topelius in me. :)

                      D Offline
                      D Offline
                      Dan Neely
                      wrote on last edited by
                      #14

                      ***THWAPP***

                      Did you ever see history portrayed as an old man with a wise brow and pulseless heart, waging all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt

                      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