|
*cough*
C# has the dereferencing operator -> but it's only available in unsafe code.
I agree, something like the scope resolution operator would be useful, but it's not vital.
No I don't find anything "intrinsically wrong" - if a class is supposed to be used only within a different class, then why the heck not declare it within that class? It doesn't have to be in the same file if you use partial classes, and it does reflect the structure of the code better than C++ friend in my opinion.
BTW: I came up through C -> C++ -> C# and I occasionally do still use C and C++. C++ shows it's ancestry, while C# shows it was designed to work with .NET from day one. Linq and suchlike are obvious bolt-ons which could have been done so much better if they had been considered when C# was designed - as could many features of modern C++!
|
|
|
|
|
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.
|
|
|
|
|
I never quite understand people who say "I hate this language because it does, or does not do, X (which is a feature of a different language)". Accept it for what it is and use its features the way they are intended. C# is a great language for developing code, but it is not the universal panacea that some would wish.
Veni, vidi, abiit domum
|
|
|
|
|
Totally agree.
|
|
|
|
|
I'm with Richard on this one, it's development tool, learn it, use it, get paid for it! I don't like web development (specifically javascript) but I still find it interesting.
You're only bitching because you are being stuffed into a new syntax, welcome to my world!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: You're only bitching because you are being stuffed into a new syntax, welcome to my world! Nah its not that. For example i find F# very interesting and fun.
I think that i dislike C# because it is so much as c++ but its not the same thing.
Microsoft ... the only place where VARIANT_TRUE != true
|
|
|
|
|
I suppose you dislike it because of your C++ background. You cannot pretend C# having the same 'behaviour' of C++ , it is a different language. It lacks several C++ features but has many, many ones missing in C++ . You need just to get used at it (and remember it is just a toy language, after all ).
Veni, vidi, vici.
|
|
|
|
|
Most C++ programmers starting with C# like it. Maybe you don't like C++?
|
|
|
|
|
Alex Fr wrote: Maybe you don't like C++? No way. I am writing in c++ since my sixth grade. I am pretty sure i don't dislike it
Microsoft ... the only place where VARIANT_TRUE != true
|
|
|
|
|
I don't think I'd agree with that statement...
|
|
|
|
|
Before I used C#, I used C and then C++ for a very long time. When I moved to C#, it took a lot of time to adjust to the way it works, but once I did, I found that it was a great language to use. If you want to be bigoted and only look for reasons to dislike languages, then you are never going to grow as a developer. If you take the time to try and understand the way that different languages work, you will grow as a developer. Currently, I'm looking into Haskell - it's a huge mind-shift for me, and I'm finding that it's opening up new ways of thinking for developing in other languages just because of that mind-shift.
|
|
|
|
|
Downsides of C#:
1. The generics in C# are far from as powerful and versatile as the templates in C++.
2. The garbage collection (even with IDisposable and "using") means RAII can't be used effectively in C#.
Apart from that, I quite like the language. In my current role, the C++:C# split is about 60:40, and I'm fine with that. I wouldn't consider using C++ for a GUI application, while C# is great for that.
|
|
|
|
|
yes^4 (all upvoted)
'g'
|
|
|
|
|
Actually, C++ is the best language ever, so any other will look pale compared to it.
/sits down and grabs pop-corn
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Do not feed the troll ! - Common proverb
|
|
|
|
|
Rage wrote: C++ is the best language ever Sorry but that accolade will always go to C, as designed by the great K&R.
Veni, vidi, abiit domum
|
|
|
|
|
... which we all know, in the depth of our hearts, was a badly implemented BASIC compiler...
speramus in juniperus
|
|
|
|
|
The beauty of c++ is that it will never die. It doesn't stop growing. For example in the latest update c++ 11 we see something very interesting for strongly typed language, the type auto.
After few years/decades/centuries(lets hope) M$ will stop supporting .Net Platform and c# will die with it. C++ doesn't need any Platforms unlike c#
Microsoft ... the only place where VARIANT_TRUE != true
|
|
|
|
|
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.
|
|
|
|
|
if(ThisProjectSuitsc++())
UseC++();
else
UseAnotherLanguage();
We can’t stop here, this is bat country - Hunter S Thompson RIP
|
|
|
|
|
I got into the whole C# vs. C++ with a previous company the end result was C++ will let you build the gallows and hang yourself, while C# will give you the gallows but makes it hard(er) to hang your self. I must admit not to being very fond of object orientation & classes (give me a struct any day!)
My Two pennies worth any now back to stick a test rig together.
|
|
|
|
|
Here is my point of view[^]. It was written in 2008, and after that I had opportunity to work with both languages, but my opinion is pretty much the same: C# is good enough for a typical enterprise application, but there is really nothing interesting or exciting about it.
|
|
|
|
|
It's been awhile since I've worked in C++ but as I skim stackoverflow and glance at the occasional specificaiton or example of C++11 I can't help but think to myself that it has become an amalgam of every computer language trend since C. How anybody figures out to write C++11 coherently, using the correct language features, at the correct time in the correct way is now beyond me.
So I for one do not miss friend classes or private inheritance (or multiple inheriteance for that matter). I say Yay C# for its relative simplicity!
10 PRINT "Software is hard. - D. Knuth"
20 GOTO 10
|
|
|
|
|
I like C#. I don't like C++.
|
|
|
|
|
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
|
|
|
|