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. What Language Features Do You Miss In C#?

What Language Features Do You Miss In C#?

Scheduled Pinned Locked Moved The Lounge
csharpjavascriptcomquestiondiscussion
102 Posts 36 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.
  • P PIEBALDconsult

    The concept is different.

    F Offline
    F Offline
    Florian Rappl
    wrote on last edited by
    #78

    What kind of concept are you talking about? That the labels are also used from the switch statement? That's certainly true but has nothing to do with goto. But you have been talking about that goto SOME_LABEL is different than goto case WHATEVER - which is wrong. I think you have never seen any assembler output from C code or MSIL from C#, just look at my example which will give you an impression of the MSIL generated from a switch-case in C#.

    P 1 Reply Last reply
    0
    • F Florian Rappl

      What kind of concept are you talking about? That the labels are also used from the switch statement? That's certainly true but has nothing to do with goto. But you have been talking about that goto SOME_LABEL is different than goto case WHATEVER - which is wrong. I think you have never seen any assembler output from C code or MSIL from C#, just look at my example which will give you an impression of the MSIL generated from a switch-case in C#.

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

      Florian Rappl wrote:

      goto SOME_LABEL is different than goto case WHATEVER

      Yes, of course.

      Florian Rappl wrote:

      assembler output

      Has no bearing on the discussion.

      F 1 Reply Last reply
      0
      • K Kent Sharkey

        Yes! And gosub.

        -------------- TTFN - Kent

        G Offline
        G Offline
        glennPattonWork3
        wrote on last edited by
        #80

        ahhh, the route to HELL :laugh:

        1 Reply Last reply
        0
        • OriginalGriffO OriginalGriff

          Because I have A Dangerous Mind[^] :-D

          If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.

          E Offline
          E Offline
          Espen Harlinn
          wrote on last edited by
          #81

          You're forgiven[^] ;)

          Espen Harlinn Principal Architect, Software - Goodtech Projects & Services AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra

          OriginalGriffO 1 Reply Last reply
          0
          • E Espen Harlinn

            You're forgiven[^] ;)

            Espen Harlinn Principal Architect, Software - Goodtech Projects & Services AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra

            OriginalGriffO Offline
            OriginalGriffO Offline
            OriginalGriff
            wrote on last edited by
            #82

            That's all I need[^] to know.

            If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.

            "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
            "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

            E 1 Reply Last reply
            0
            • OriginalGriffO OriginalGriff

              That's all I need[^] to know.

              If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.

              E Offline
              E Offline
              Espen Harlinn
              wrote on last edited by
              #83

              Good, I apologize[^] for the interruption ...

              Espen Harlinn Principal Architect, Software - Goodtech Projects & Services AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra

              OriginalGriffO 1 Reply Last reply
              0
              • E Espen Harlinn

                Good, I apologize[^] for the interruption ...

                Espen Harlinn Principal Architect, Software - Goodtech Projects & Services AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra

                OriginalGriffO Offline
                OriginalGriffO Offline
                OriginalGriff
                wrote on last edited by
                #84

                Why? What have you done?[^]

                If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.

                "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                E 1 Reply Last reply
                0
                • K Kent Sharkey

                  Sure, it's on another discussion site[^], but that doesn't mean we can't also discuss it here. Personally, while it certainly doesn't fit in the "missing" category, I see them moving it closer and closer to a hybrid C#/JavaScript language with each new version.

                  -------------- TTFN - Kent

                  R Offline
                  R Offline
                  rexnfx
                  wrote on last edited by
                  #85

                  Co-routines or a better way to do single threaded faux-parallelism than perverting iterators.

                  1 Reply Last reply
                  0
                  • P PIEBALDconsult

                    Florian Rappl wrote:

                    goto SOME_LABEL is different than goto case WHATEVER

                    Yes, of course.

                    Florian Rappl wrote:

                    assembler output

                    Has no bearing on the discussion.

                    F Offline
                    F Offline
                    Florian Rappl
                    wrote on last edited by
                    #86

                    Either you are incapable of understanding this or you just do not want to get this. Your statement that there are 2 gotos is wrong. From a language point of view using goto with some (arbitrary) label and with a case label is equivalent.

                    P 1 Reply Last reply
                    0
                    • P PIEBALDconsult

                      But you can't know what may be thrown by something it calls, so I don't see the point.

                      J Offline
                      J Offline
                      Jasmine2501
                      wrote on last edited by
                      #87

                      In Java, every function must declare all potential throws. The compiler looks down the call stack and makes sure that exceptions are either handled or declared in the throws. If not, it's a compilation error. That annoys many Java developers, which is why I think the feature should be optional. If it was optional, we could generate a warning on unhandled exceptions. IT would not be a compilation error like it is in Java. This wouldn't totally prevent any problems, but it would give developers a way to be more explicit about what exceptions can happen. For library designers this would be very helpful.

                      1 Reply Last reply
                      0
                      • T Thornik

                        I wanna have multi-return: (a, b) = SplitComplexNumber(d);

                        J Offline
                        J Offline
                        Jasmine2501
                        wrote on last edited by
                        #88

                        The only good feature of Ruby! AWESOME :)

                        1 Reply Last reply
                        0
                        • OriginalGriffO OriginalGriff

                          Why? What have you done?[^]

                          If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.

                          E Offline
                          E Offline
                          Espen Harlinn
                          wrote on last edited by
                          #89

                          I'm afraid I've made a shot in the dark[^]

                          Espen Harlinn Principal Architect, Software - Goodtech Projects & Services AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra

                          OriginalGriffO 1 Reply Last reply
                          0
                          • E Espen Harlinn

                            I'm afraid I've made a shot in the dark[^]

                            Espen Harlinn Principal Architect, Software - Goodtech Projects & Services AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra

                            OriginalGriffO Offline
                            OriginalGriffO Offline
                            OriginalGriff
                            wrote on last edited by
                            #90

                            Argh! You got me - I'm Blooded[^]

                            If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.

                            "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                            "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                            E 1 Reply Last reply
                            0
                            • OriginalGriffO OriginalGriff

                              Argh! You got me - I'm Blooded[^]

                              If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.

                              E Offline
                              E Offline
                              Espen Harlinn
                              wrote on last edited by
                              #91

                              Oh, I'm so sorry - this must not be the The Last Time[^] we have such a jolly chat ...

                              Espen Harlinn Principal Architect, Software - Goodtech Projects & Services AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra

                              OriginalGriffO 1 Reply Last reply
                              0
                              • E Espen Harlinn

                                Oh, I'm so sorry - this must not be the The Last Time[^] we have such a jolly chat ...

                                Espen Harlinn Principal Architect, Software - Goodtech Projects & Services AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra

                                OriginalGriffO Offline
                                OriginalGriffO Offline
                                OriginalGriff
                                wrote on last edited by
                                #92

                                Murder![^] I'll see you caged[^] for this! :laugh:

                                If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.

                                "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                                "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                                E 1 Reply Last reply
                                0
                                • OriginalGriffO OriginalGriff

                                  Murder![^] I'll see you caged[^] for this! :laugh:

                                  If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.

                                  E Offline
                                  E Offline
                                  Espen Harlinn
                                  wrote on last edited by
                                  #93

                                  This is tuning into high drama - must our farewell [^] turn into such a bittersweet[^] afair. This is worse than A Demon's Fate[^], and now that peace is a Utopia[^] we will only be dealt a hand of sorrow[^] ...

                                  Espen Harlinn Principal Architect, Software - Goodtech Projects & Services AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra

                                  OriginalGriffO 1 Reply Last reply
                                  0
                                  • E Espen Harlinn

                                    This is tuning into high drama - must our farewell [^] turn into such a bittersweet[^] afair. This is worse than A Demon's Fate[^], and now that peace is a Utopia[^] we will only be dealt a hand of sorrow[^] ...

                                    Espen Harlinn Principal Architect, Software - Goodtech Projects & Services AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra

                                    OriginalGriffO Offline
                                    OriginalGriffO Offline
                                    OriginalGriff
                                    wrote on last edited by
                                    #94

                                    Uncle! Uncle! I surrender (before this thread runs off the right hand side of my browser)!

                                    If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.

                                    "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                                    "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                                    E 1 Reply Last reply
                                    0
                                    • OriginalGriffO OriginalGriff

                                      Uncle! Uncle! I surrender (before this thread runs off the right hand side of my browser)!

                                      If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.

                                      E Offline
                                      E Offline
                                      Espen Harlinn
                                      wrote on last edited by
                                      #95

                                      OK - t'was fun though. CG once pointed me in the direction of lacuna coil Trip The Darkness[^] - a bit wild around the eyes, but worth listening too ...

                                      Espen Harlinn Principal Architect, Software - Goodtech Projects & Services AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra

                                      1 Reply Last reply
                                      0
                                      • Sander RosselS Sander Rossel

                                        Having a generic type constraint on operators. Something where T : +, -, >, < Or something. Or just provide one easy way to work with numerics, for example: Something where T : numeric After which you can use +, -, >, < etc. by default and T can be int16, int 32, int64, single, byte, double, decimal or an unsigned of those.

                                        It's an OO world.

                                        public class Naerling : Lazy<Person>{
                                        public void DoWork(){ throw new NotImplementedException(); }
                                        }

                                        M Offline
                                        M Offline
                                        Mike Marynowski
                                        wrote on last edited by
                                        #96

                                        God yes, there is no reason not to expand generic constrains to include operators, and that would make my life soooooo much easier for so many things I'm working on :(

                                        1 Reply Last reply
                                        0
                                        • F Florian Rappl

                                          Either you are incapable of understanding this or you just do not want to get this. Your statement that there are 2 gotos is wrong. From a language point of view using goto with some (arbitrary) label and with a case label is equivalent.

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

                                          No it isn't.

                                          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