To like or dislike C Sharp
-
At work i am working alone on the only remaining c++ project. But now new we started working on a new project in c#. So i am writing one of its projects (I pity my coworkers for working with me on the same project) and i was thinking "Oh i will make The class A private so it will be used only with the Class B and just use friend" but of course M$ had other ideas. Today was a good day i found another reason to dislike C Sharp. So i wonder what makes you people like or dislike C Sharp
Microsoft ... the only place where VARIANT_TRUE != true
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
-
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.
It's a new syntax; but as long as you resist the urge to be stupid* with it linq one liners can be as easy to understand as the 3-6 line loops they replaced while taking less actual time to read because they're much shorter. * Or to click yes every time R#er says "I can Linqify that loop for you" because it can and does produce truly awful results in some cases. OTOH most of those WTFs can also be written as a much nicer Linq expression if you ask Google for advice.
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
-
At work i am working alone on the only remaining c++ project. But now new we started working on a new project in c#. So i am writing one of its projects (I pity my coworkers for working with me on the same project) and i was thinking "Oh i will make The class A private so it will be used only with the Class B and just use friend" but of course M$ had other ideas. Today was a good day i found another reason to dislike C Sharp. So i wonder what makes you people like or dislike C Sharp
Microsoft ... the only place where VARIANT_TRUE != true
-
Nobody likes friends! ;P :laugh:
-
I don't think I'd agree with that statement...
-
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
Hear! Hear!
-
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();
} -
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
-
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.
Exactly; a language is just a language. In theory it can be implemented for any system.
-
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.
Yes, yes, yes. 100% yes.
Regards, Rob Philpott.