tags:

views:

247

answers:

5

Currently, i have basic C++ and PHP skills. But, i want to switch to C# and ASP ( for the web part ). Why ? you will ask. Because i have the opportunity to learn pretty easily C# ( including OOP-ed ) to a pretty advanced level. And because i read that ASP is very similar to C#, i'm thinking to learn it.

So, there are many stuff that can't be done in C# ? What kind of stuff ? The same question for ASP.

+8  A: 

Limitations of C# (and, by association, .NET):

  • Not really a systems level language - not generally good for writing drivers etc. (Having said which, there are interesting projects like Cosmos.)
  • Limited support of platforms other than Windows. Mono does a good job, but it's still not at parity with .NET itself (compared with, say, Java which has simultaneous releases on multiple platforms).
  • Only options for running as an unmanaged language are third-party ones - ngen will "pre-JIT" your code, but it's still running under the .NET framework. Really C# was designed to be running in a VM, with garbage collection.
  • Some people don't like the lack of deterministic destruction, which means the C++ RAII technique doesn't work. (Instead, you rely on the GC for memory management and the IDisposable interface for non-memory resources. The using statement makes this easier, but it's not a perfect solution.)
  • The language is somewhat at the whim of Microsoft. If MS decided to abandon it, I think it wouldn't progress any further and would quickly lose support for new development. Having said that, I don't expect MS to abandon it any time soon.
  • Until C# 4 comes out, it doesn't have much support for late binding. You can do it with reflection, but it's somewhat painful. Even with C# 4, it will still be a fundamentally static language, but with ways of working dynamically where it really helps.
  • Currently there's not much support for immutability. In particular, C# 3 introduced a few new features (automatic properties, collection initializers, object initializers) which make it easier to write mutable types - but no corresponding features are available for immutable types. Named and optional parameters in C# 4 should help on this front, but more support would be welcome. C# 3 made it easier to code in a functional style, but this really requires immutability.
  • For desktop app development, you basically have a choice between WinForms and WPF (Windows Presentation foundation). The latter is newer and much better designed IMO, but in both cases you may well see a slight difference in "snappiness" between a managed application and a well-written Win32 app. This is particularly true at start-up, while the framework is loading and lots of UI code is being JITted etc. Personally I don't think it's much of a barrier, but...
Jon Skeet
It would depend on what it was being compared with.
Jon Skeet
A: 

Yes, i'm talking about ASP.NET

Cumatru
Please edit your question
MrChrister
+1  A: 

Well, you have to distinguish between ASP (referred now as Classic ASP) and ASP.NET (I suppose you could call the new version just ASP, but it's a bit confusing). Now. ASP.NET is a technology for which you can write Web applications in any .NET language like VB.NET or C#. I wouldn't say there is a lot you can do in C# that you can't do in other languages. It is Turing Complete.

I think it is a good idea to learn C# as it is a very popular language and knowing another language will not hurt you. Of course, you have to realize you will also be learning the .NET Framework which is separate from C#.

BobbyShaftoe
+2  A: 

Another consideration, on top of what the other respondents are saying, is that hosting .NET apps is generally more expensive than hosting PHP apps, because of the various MS license costs. This may or may not be an issue for you.

gkrogers
A: 

.Net is growing in the enterprise market but C# still is a static, type-safe, compile based language. Despite MS is moving towards the dynamic languages (like Iron Ruby), in the future the Common Language Runtime (the core of .Net) will be a type-safe wrapper to a Dynamic Language Runtime, but for now the development paradigm is quite different.

And since you're mentioned ASP.Net, in the future you'll be facing two options: ASP.Net Web Forms, which is the classic platform, and ASP.Net MVC, a Model-View-Controller based platform closer of how Ruby On Rails is structured.

t3mujin