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. [Message Deleted]

[Message Deleted]

Scheduled Pinned Locked Moved The Lounge
92 Posts 33 Posters 3 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.
  • B Brady Kelly

    leonej_dt wrote:

    The same thing goes for C#.

    Nooit! :rolleyes:

    L Offline
    L Offline
    leonej_dt
    wrote on last edited by
    #81

    Brady Kelly wrote:

    leonej_dt wrote: The same thing goes for C#. Nooit!

    C# doesn't allow me to mess with pointers, define templates or even allocate objects in the stack. As far as I know, in C#, you can only use references in method parameters, that means you can't return a reference to a value type. When I need to do OOP, C# doesn't allow me to do multiple inheritance. And when I don't need to do OOP, C# forces me to write static classes. In other words, C# tries to tell me what to do, what to expect and how to think.

    If you can play The Dance of Eternity (Dream Theater), then we shall make a band.

    S 1 Reply Last reply
    0
    • L leonej_dt

      Brady Kelly wrote:

      leonej_dt wrote: The same thing goes for C#. Nooit!

      C# doesn't allow me to mess with pointers, define templates or even allocate objects in the stack. As far as I know, in C#, you can only use references in method parameters, that means you can't return a reference to a value type. When I need to do OOP, C# doesn't allow me to do multiple inheritance. And when I don't need to do OOP, C# forces me to write static classes. In other words, C# tries to tell me what to do, what to expect and how to think.

      If you can play The Dance of Eternity (Dream Theater), then we shall make a band.

      S Offline
      S Offline
      S Senthil Kumar
      wrote on last edited by
      #82

      leonej_dt wrote:

      C# doesn't allow me to mess with pointers

      Ever heard of unsafe code? GCHandle?

      leonej_dt wrote:

      define templates

      C# has generics - not quite as powerful as templates, but the idea is the same (parameterized types).

      leonej_dt wrote:

      even allocate objects in the stack

      struct?

      leonej_dt wrote:

      As far as I know, in C#, you can only use references in method parameters, that means you can't return a reference to a value type.

      Nope, you can pass structs both into and out of a method. You can optionally pass them by reference using the ref keyword.

      leonej_dt wrote:

      C# doesn't allow me to do multiple inheritance. And when I don't need to do OOP, C# forces me to write static classes.

      No contesting these points :)

      Regards Senthil [MVP - Visual C#] _____________________________ My Home Page |My Blog | My Articles | My Flickr | WinMacro

      L 1 Reply Last reply
      0
      • S S Senthil Kumar

        leonej_dt wrote:

        C# doesn't allow me to mess with pointers

        Ever heard of unsafe code? GCHandle?

        leonej_dt wrote:

        define templates

        C# has generics - not quite as powerful as templates, but the idea is the same (parameterized types).

        leonej_dt wrote:

        even allocate objects in the stack

        struct?

        leonej_dt wrote:

        As far as I know, in C#, you can only use references in method parameters, that means you can't return a reference to a value type.

        Nope, you can pass structs both into and out of a method. You can optionally pass them by reference using the ref keyword.

        leonej_dt wrote:

        C# doesn't allow me to do multiple inheritance. And when I don't need to do OOP, C# forces me to write static classes.

        No contesting these points :)

        Regards Senthil [MVP - Visual C#] _____________________________ My Home Page |My Blog | My Articles | My Flickr | WinMacro

        L Offline
        L Offline
        leonej_dt
        wrote on last edited by
        #83

        S. Senthil Kumar wrote:

        Ever heard of unsafe code? GCHandle?

        Of course I know what unsafe code is. But if I want 98% of my code to be unsafe, I'd rather use C++.

        S. Senthil Kumar wrote:

        C# has generics

        Generics don't do what I want them to do. Besides, there is not such a thing as generic specialization.

        S. Senthil Kumar wrote:

        leonej_dt wrote: even allocate objects in the stack struct?

        Structs don't allow inheritance.

        S. Senthil Kumar wrote:

        you can pass structs both into and out of a method. You can optionally pass them by reference using the ref keyword.

        But that syntax sucks.

        S. Senthil Kumar wrote:

        leonej_dt wrote: C# doesn't allow me to do multiple inheritance. And when I don't need to do OOP, C# forces me to write static classes. No contesting these points

        There are the main reasons why I use C++.

        If you can play The Dance of Eternity (Dream Theater), then we shall make a band.

        S 1 Reply Last reply
        0
        • L leonej_dt

          S. Senthil Kumar wrote:

          Ever heard of unsafe code? GCHandle?

          Of course I know what unsafe code is. But if I want 98% of my code to be unsafe, I'd rather use C++.

          S. Senthil Kumar wrote:

          C# has generics

          Generics don't do what I want them to do. Besides, there is not such a thing as generic specialization.

          S. Senthil Kumar wrote:

          leonej_dt wrote: even allocate objects in the stack struct?

          Structs don't allow inheritance.

          S. Senthil Kumar wrote:

          you can pass structs both into and out of a method. You can optionally pass them by reference using the ref keyword.

          But that syntax sucks.

          S. Senthil Kumar wrote:

          leonej_dt wrote: C# doesn't allow me to do multiple inheritance. And when I don't need to do OOP, C# forces me to write static classes. No contesting these points

          There are the main reasons why I use C++.

          If you can play The Dance of Eternity (Dream Theater), then we shall make a band.

          S Offline
          S Offline
          S Senthil Kumar
          wrote on last edited by
          #84

          leonej_dt wrote:

          But if I want 98% of my code to be unsafe, I'd rather use C++.

          If 98% of my code is unsafe, I wouldn't look at the .NET framework at all, never mind C#. And it's kind of pointless to argue that a language designed to run on top of such a framework doesn't support unsafe features.

          leonej_dt wrote:

          Generics don't do what I want them to do. Besides, there is not such a thing as generic specialization.

          I don't know how you use templates - if you're a really aggressive user (think Alexi Alexadrescue's book), you'll probably find generics don't fit the bill. But for type safe containers and such, generics work great.

          leonej_dt wrote:

          Structs don't allow inheritance.

          Yes, but how is it related to allocating them on the stack? Contrast this to Java, which simply doesn't allow user defined types to exist on the stack.

          leonej_dt wrote:

          But that syntax sucks.

          Syntax is a subjective matter, but I'm surprised to hear this from a C++ programmer. How different is typing ref from typing an & or a *?

          Regards Senthil [MVP - Visual C#] _____________________________ My Home Page |My Blog | My Articles | My Flickr | WinMacro

          L 1 Reply Last reply
          0
          • S S Senthil Kumar

            leonej_dt wrote:

            But if I want 98% of my code to be unsafe, I'd rather use C++.

            If 98% of my code is unsafe, I wouldn't look at the .NET framework at all, never mind C#. And it's kind of pointless to argue that a language designed to run on top of such a framework doesn't support unsafe features.

            leonej_dt wrote:

            Generics don't do what I want them to do. Besides, there is not such a thing as generic specialization.

            I don't know how you use templates - if you're a really aggressive user (think Alexi Alexadrescue's book), you'll probably find generics don't fit the bill. But for type safe containers and such, generics work great.

            leonej_dt wrote:

            Structs don't allow inheritance.

            Yes, but how is it related to allocating them on the stack? Contrast this to Java, which simply doesn't allow user defined types to exist on the stack.

            leonej_dt wrote:

            But that syntax sucks.

            Syntax is a subjective matter, but I'm surprised to hear this from a C++ programmer. How different is typing ref from typing an & or a *?

            Regards Senthil [MVP - Visual C#] _____________________________ My Home Page |My Blog | My Articles | My Flickr | WinMacro

            L Offline
            L Offline
            leonej_dt
            wrote on last edited by
            #85

            S. Senthil Kumar wrote:

            Yes, but how is it related to allocating them on the stack?

            In one of my projects, an MFC dialog-based application, I have a class called CGraficosDC derived from CClientDC. In the main dialog's class, there are buttons whose event handlers look like this: void CGraficosDlg::OnEjercicio1() {   CGraficosDC dc(this); // this object lives in the stack   // ... }

            S. Senthil Kumar wrote:

            Contrast this to Java, which simply doesn't allow user defined types to exist on the stack.

            Java sucks, period. But that is off-topic. [Edit: The following text was added]

            S. Senthil Kumar wrote:

            leonej_dt wrote: But if I want 98% of my code to be unsafe, I'd rather use C++. If 98% of my code is unsafe, I wouldn't look at the .NET framework at all, never mind C#.

            Did you think I meant C++/CLI? C'mon! [Second edit: The following text was added]

            S. Senthil Kumar wrote:

            Syntax is a subjective matter, but I'm surprised to hear this from a C++ programmer. How different is typing ref from typing an & or a *?

            What sucks is the fact I can't write a routine like this in C#: ReturnType& CUndocumented::AMethod(ParamType1 par1, ParamType2 par2) { // do something }

            If you can play The Dance of Eternity (Dream Theater), then we shall make a band.

            1 Reply Last reply
            0
            • B Brady Kelly

              Harvey Saayman wrote:

              Your going to start a language war

              Whose language you looking at? You mean to say you**'**re going to start a language war.

              H Offline
              H Offline
              Harvey Saayman
              wrote on last edited by
              #86

              My language is bigger than yours ;P

              Harvey Saayman - South Africa Junior Developer .Net, C#, SQL you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer) 1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111

              B 1 Reply Last reply
              0
              • H Harvey Saayman

                My language is bigger than yours ;P

                Harvey Saayman - South Africa Junior Developer .Net, C#, SQL you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer) 1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111

                B Offline
                B Offline
                Brady Kelly
                wrote on last edited by
                #87

                Harvey Saayman wrote:

                yours

                That's better. :laugh:

                1 Reply Last reply
                0
                • B Brady Kelly

                  Perspx wrote:

                  documentation

                  Cough, splutter, cough, spit, CSS? Better documentationz? Nooit!

                  P Offline
                  P Offline
                  Perspx
                  wrote on last edited by
                  #88

                  Yes, but at least W3C acts as a standards body; Microsoft is the standards body for Windows development, and after traversing to the depths of MSDN, I never want to go there again :sigh: Regards, --Perspx

                  Don't trust a computer you can't throw out a window

                  -- Steve Wozniak

                  B 1 Reply Last reply
                  0
                  • B Brady Kelly

                    Anna-Jayne Metcalfe wrote:

                    so what would I know...? Roll eyes

                    :~

                    A Offline
                    A Offline
                    Anna Jayne Metcalfe
                    wrote on last edited by
                    #89

                    Now I'm confused. More coffee please!! :-\

                    Anna :rose: Having a bad bug day? Tech Blog | Anna's Place | Tears and Laughter "If mushy peas are the food of the devil, the stotty cake is the frisbee of God"

                    1 Reply Last reply
                    0
                    • D Dan Neely

                      OK. But you have to buy them yourself and bill them against the total balance of the contract. We are not responsible for cost overruns on your end.

                      Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

                      P Offline
                      P Offline
                      Pawel Krakowiak
                      wrote on last edited by
                      #90

                      I work only on hourly basis currently. ;P I don't do fixed price work, so I guess we don't match.

                      1 Reply Last reply
                      0
                      • U Uros Calakovic

                        meenakumar wrote:

                        windows or web development?? why? does c++ has scope still? or should I turn to dot net?

                        Forget programming. Write haiku. Regards.

                        In January you said "money in April" B. Python

                        E Offline
                        E Offline
                        El Corazon
                        wrote on last edited by
                        #91

                        Uros Calakovic - Urke wrote:

                        Forget programming. Write haiku. Regards.

                        int main() // my haiku { printf("I write Haiku also\n"); printf("program C.\n");}

                        _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb) John Andrew Holmes "It is well to remember that the entire universe, with one trifling exception, is composed of others."

                        1 Reply Last reply
                        0
                        • P Perspx

                          Yes, but at least W3C acts as a standards body; Microsoft is the standards body for Windows development, and after traversing to the depths of MSDN, I never want to go there again :sigh: Regards, --Perspx

                          Don't trust a computer you can't throw out a window

                          -- Steve Wozniak

                          B Offline
                          B Offline
                          Brady Kelly
                          wrote on last edited by
                          #92

                          Perspx wrote:

                          Microsoft is the standards body for Windows development

                          Not quite. C# is an open (ECMA) standard, with a free compiler and spec.

                          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