|
You can always put your internal classes into a separate source file using partial classes
MVVM # - I did it My Way
___________________________________________
Man, you're a god. - walterhevedeich 26/05/2011
.\\axxx
(That's an 'M')
|
|
|
|
|
|
Seconded. Anyway, friend? really?
|
|
|
|
|
Nobody likes friends!
|
|
|
|
|
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.
|
|
|
|
|
They can get a bit...difficult...but not as much as a carelessly written regex!
|
|
|
|
|
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
|
|
|
|
|
Yes, yes, yes. 100% yes.
Regards,
Rob Philpott.
|
|
|
|
|
Impenetrable? Humph.
Anyway - not to start a debate, but don't you find something intrinsically wrong with your example?
Class inside of class (inside of class (inside of class (inside of class (inside of class (inside of class . . .
???
I look at it this way C# is a good lure to get lifetime-rookies away from VB. But it hides what you're really doing.
There's no distinction, visibly between a namespace or a class in terms of separation, for example. (in C++, we have ::, ., and -> vs. . the C#). It makes things easier and masks understanding. I also like the possibility of multiple inheritance without a cascade of derivations - not too often, but when I want it I want it)
It's not so much cut-down as light. Per my VB->C# view, that's a good thing . . . as an intermediate step to the real thing.
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "As far as we know, our computer has never had an undetected error." - Weisert | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
*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
|
|
|
|