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. To like or dislike C Sharp

To like or dislike C Sharp

Scheduled Pinned Locked Moved The Lounge
csharpc++learning
44 Posts 27 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.
  • OriginalGriffO OriginalGriff

    I like it. If you stop thinking "cut down C++" and consider it as a separate language in it's own right, it is very good - in some ways a lot better than C++ in that it is a lot harder to write impenetrable cr@p in C# than it is in C++. If you want a class that is only available to Class B, then declare it as private and part of the B Class:

    public class B
    {
    private class A
    {
    ...
    }
    A a = new A();
    }

    J Offline
    J Offline
    jschell
    wrote on last edited by
    #41

    OriginalGriff wrote:

    in that it is a lot harder to write impenetrable cr@p in C# than it is in C++.

    Pretty sure it is ridiculously easy to write impenetrable code in any language.

    1 Reply Last reply
    0
    • M Marc Clifton

      Argonia wrote:

      Oh i will make The class A private so it will be used only with the Class B and just use friend

      Good grief. Even when I was coding C++ (which I did for years) I thought private classes and "friends" were a bad design. Yes, C++ templates are a lot more flexible than C# generics, yes, multiple inheritance does have its uses when used carefully and interfaces don't always cut it, but other than that, I quite enjoy the ease of C# development. And you can specify "friend" assemblies in C#, but again, I consider it a bad idea. Marc

      Day 1: Spider Database Navigator Unit Testing Succinctly

      pkfoxP Offline
      pkfoxP Offline
      pkfox
      wrote on last edited by
      #42

      +1 for not liking *friends* they go against the grain of *encapsulation* for one thing, and another thing *I don't like them* ;-) We can’t stop here, this is bat country - Hunter S Thompson RIP

      1 Reply Last reply
      0
      • P Pete OHanlon

        Argonia wrote:

        After few years/decades/centuries(lets hope) M$ will stop supporting .Net Platform and c# will die with it.

        Why would C# die with it? It doesn't need to run on .NET - there is at least one alternative to the .NET framework, and C# is now producing code for iOS and Android as well.

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

        Exactly; a language is just a language. In theory it can be implemented for any system.

        1 Reply Last reply
        0
        • C Chris Losinger

          OriginalGriff wrote:

          it is a lot harder to write impenetrable cr@p in C# than it is in C++.

          maybe, as long as you don't get near LINQ or anonymous functions.

          image processing toolkits | batch image processing

          R Offline
          R Offline
          Rob Philpott
          wrote on last edited by
          #44

          Yes, yes, yes. 100% yes.

          Regards, Rob Philpott.

          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