QwertieQwertie

My feedback

  1. 10 votes
    Vote
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      You have left! (?) (thinking…)
      1 comment  ·  Visual Studio IDE » .NET  ·  Flag idea as inappropriate…  ·  Admin →
      QwertieQwertie shared this idea  · 
    • 6 votes
      Vote
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        I agree to the terms of service
        Signed in as (Sign out)
        You have left! (?) (thinking…)
        0 comments  ·  Visual Studio IDE » IDE and Editor  ·  Flag idea as inappropriate…  ·  Admin →
        QwertieQwertie shared this idea  · 
      • 3 votes
        Vote
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          I agree to the terms of service
          Signed in as (Sign out)
          You have left! (?) (thinking…)
          1 comment  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
          QwertieQwertie commented  · 

          This is a duplicate of another suggestion with more votes (too busy to find it now)

        • 3 votes
          Vote
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            I agree to the terms of service
            Signed in as (Sign out)
            You have left! (?) (thinking…)
            1 comment  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
            QwertieQwertie commented  · 

            OMG I have wondered for years how to get those **** intermediate binaries out of my source code folders. No votes left though.

          • 3 votes
            Vote
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
            • facebook
            • google
              Password icon
              I agree to the terms of service
              Signed in as (Sign out)
              You have left! (?) (thinking…)
              2 comments  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
              QwertieQwertie commented  · 

              My counterproposal would be an on_throw_catch statement that causes any exceptions in the code that follows to be caught:

              on_throw_catch { return -1; }
              return int.Parse(myStr);

              This is part of a much larger feature supported by enhanced C#: http://ecsharp.net/lemp/ref-on_star.html

              I realize that your proposal gives shorter code, but exception catching is a heavy, expensive operation and your proposed syntax misleadingly makes it look like it's not a big deal.

            • 3 votes
              Vote
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                I agree to the terms of service
                Signed in as (Sign out)
                You have left! (?) (thinking…)
                2 comments  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                QwertieQwertie commented  · 

                This is a duplicate of an identical suggestion with more votes.

              • 3 votes
                Vote
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  I agree to the terms of service
                  Signed in as (Sign out)
                  You have left! (?) (thinking…)
                  1 comment  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                  QwertieQwertie commented  · 

                  This request doesn't make sense. You're proposing to resolve the overload to be called at runtime, but the compiler always determines the return type at compile-time.

                  The closest you're going to get is

                  public dynamic Factorial(int n) {
                  if (n < 12) {...}
                  else {...}
                  }

                • 3 votes
                  Vote
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    I agree to the terms of service
                    Signed in as (Sign out)
                    You have left! (?) (thinking…)
                    3 comments  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                    QwertieQwertie commented  · 

                    I imagine a [Popular] or [Important] attribute on popular methods and attributes.

                    There's already a [EditorBrowsable(EditorBrowsableState.Never)] attribute for hiding things from IntelliSense; they could extend this with an [EditorBrowsable(EditorBrowsableState.Important)] option.

                  • 3 votes
                    Vote
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                    • facebook
                    • google
                      Password icon
                      I agree to the terms of service
                      Signed in as (Sign out)
                      You have left! (?) (thinking…)
                      1 comment  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                      QwertieQwertie commented  · 

                      The current way of doing this is

                      Enumerable.Range(0, 10).Select(u => u * u).ToArray()
                      Enumerable.Range(0, 5).SelectMany(u => Enumerable.Range(0, 5).Select(v => u + v)).ToArray()

                      There's probably a shorter way to write these using LINQ but I'm not sure how to write the second one in LINQ.

                    • 3 votes
                      Vote
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        I agree to the terms of service
                        Signed in as (Sign out)
                        You have left! (?) (thinking…)
                        1 comment  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                        QwertieQwertie commented  · 

                        That's not a bad idea. I have no votes left though.

                      • 3 votes
                        Vote
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          I agree to the terms of service
                          Signed in as (Sign out)
                          You have left! (?) (thinking…)
                          1 comment  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                          QwertieQwertie commented  · 

                          I propose triple-quoted strings, which not only makes it easy to put quotes in strings but also newlines:

                          http://ecsharp.net/ecs/for-normal-coders#triple-quoted-strings

                        • 3 votes
                          Vote
                          Sign in
                          Check!
                          (thinking…)
                          Reset
                          or sign in with
                          • facebook
                          • google
                            Password icon
                            I agree to the terms of service
                            Signed in as (Sign out)
                            You have left! (?) (thinking…)
                            2 comments  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                            QwertieQwertie commented  · 

                            I would love to have a feature like this, but likely all we're going to get is an approximation of it through the new tuple feature they're working on in C# 7. How that works is, you can write

                            (int a, int b) T1 = (123, 456);
                            (int x, int y) T2 = (int,int)T1;

                            And this will work.

                          • 3 votes
                            Vote
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                            • facebook
                            • google
                              Password icon
                              I agree to the terms of service
                              Signed in as (Sign out)
                              You have left! (?) (thinking…)
                              1 comment  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                              QwertieQwertie commented  · 

                              The funny thing is, MS actually has a patent on this, but are not likely to implement it in C# - certainly not the way you describe, because `not` is not a keyword and therefore "x is not y` is syntactically ambiguous with the C# 7 pattern matching feature.

                            • 3 votes
                              Vote
                              Sign in
                              Check!
                              (thinking…)
                              Reset
                              or sign in with
                              • facebook
                              • google
                                Password icon
                                I agree to the terms of service
                                Signed in as (Sign out)
                                You have left! (?) (thinking…)
                                1 comment  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                                QwertieQwertie commented  · 

                                The C# team has already implemented this in Roslyn, so this feature is likely to appear in C# 7 or 8.

                              • 3 votes
                                Vote
                                Sign in
                                Check!
                                (thinking…)
                                Reset
                                or sign in with
                                • facebook
                                • google
                                  Password icon
                                  I agree to the terms of service
                                  Signed in as (Sign out)
                                  You have left! (?) (thinking…)
                                  1 comment  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                                  QwertieQwertie commented  · 

                                  They've already done it! What you're describing is .NET Core. The main thing that is not available outside Windows is the VS IDE, which MS is probably reluctant to port because they want to keep developers using Windows.

                                • 3 votes
                                  Vote
                                  Sign in
                                  Check!
                                  (thinking…)
                                  Reset
                                  or sign in with
                                  • facebook
                                  • google
                                    Password icon
                                    I agree to the terms of service
                                    Signed in as (Sign out)
                                    You have left! (?) (thinking…)
                                    1 comment  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                                    QwertieQwertie commented  · 

                                    It's pretty mysterious to me why the C# team doesn't want to do features like this, but they've rejected this consistently (whether the field is readonly or not doesn't seem important).

                                  • 4 votes
                                    Vote
                                    Sign in
                                    Check!
                                    (thinking…)
                                    Reset
                                    or sign in with
                                    • facebook
                                    • google
                                      Password icon
                                      I agree to the terms of service
                                      Signed in as (Sign out)
                                      You have left! (?) (thinking…)
                                      2 comments  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                                      QwertieQwertie commented  · 

                                      The lack of "consistency" is because String.Empty is a rather different kind of entity (a static member, which null is not.) Note that you can always just write "" instead of String.Empty.

                                    • 4 votes
                                      Vote
                                      Sign in
                                      Check!
                                      (thinking…)
                                      Reset
                                      or sign in with
                                      • facebook
                                      • google
                                        Password icon
                                        I agree to the terms of service
                                        Signed in as (Sign out)
                                        You have left! (?) (thinking…)
                                        1 comment  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                                        QwertieQwertie commented  · 

                                        Your prayers are answered. The C# team has been working on tuples with named items for more than a year now.

                                      • 4 votes
                                        Vote
                                        Sign in
                                        Check!
                                        (thinking…)
                                        Reset
                                        or sign in with
                                        • facebook
                                        • google
                                          Password icon
                                          I agree to the terms of service
                                          Signed in as (Sign out)
                                          You have left! (?) (thinking…)
                                          2 comments  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                                          QwertieQwertie commented  · 

                                          This feature is supported in some languages as the "redo" keyword, notably perl.

                                          for (int i = 0; i < L.Count; i++) { ... if (foo) redo; ... }

                                          I should add this to Enhanced C# sometime...

                                        • 5 votes
                                          Vote
                                          Sign in
                                          Check!
                                          (thinking…)
                                          Reset
                                          or sign in with
                                          • facebook
                                          • google
                                            Password icon
                                            I agree to the terms of service
                                            Signed in as (Sign out)
                                            You have left! (?) (thinking…)
                                            2 comments  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                                            QwertieQwertie commented  · 

                                            It's because you have to tell the compiler what should happen in case of null: (_Client?.Connected ?? false) or (_Client?.Connected ?? true)

                                          ← Previous 1 3

                                          Feedback and Knowledge Base