in a way its quite easy, if your completly fluent in c that is, and also know an object orientated language like c++ or one of the other ones,,, such as java j++ etc.
its all object orientated, ie you cant even write a single function or a single variable at all whatsoever if it isnt part of an object.
wel the pros are :-
1) memory managed = no memory leaks, no bogus pointers which make you head explode after weeks of debuging
2) no header files used or needed
3) extremly platform friendly, .net is standard on winxp.
unix also has .mono (which is suposed to be the same but ive heard some people whinge about it.)
3a)extensive librarys can be shared easily and multiple versions are handled so out of date dll or "DLLHELL" is no longer an issue.
4) JIT compiled which means best of both worlds ie compiled into an intermediate language like most interpreted languages so its very fast to compile, and very small, but only when its actually needed is it compiled into actual machine code. it will compile into the language native to the machine its run on.
5) no messy macros to get you into trouble.
6) very tight type usage.
(ie you cant use an interger as a conditional)
7) generics which are like templates, and enforce very tight control.
8) .net libray which is huge,
9) lots of goodies like quick list iteration loops using something like foreach(cat in litter) ...
10) properties can mimic variable fields in structs/clases
11) you can also use unsafe code which is dangerous like c but can be usefull
12) REFLECTION it is the most powerfull access to the meta data, this is basically the information of the program that can be examined at runtime. you can examine any object unknown at compile time and set any variable cal any function of it.
13) runtime compilation ! - you can generate code at runtime and incorporate it. !!!
14) ITS GOT A FREE IDE !
15) LINQ i have no clue what this is but MS think its the best thing since marmite so its probably crap.
16) its got extension methods, which allow you to add things to clases as if they were actualy writen in the class.
17) its got partial classes which alow you to spread a cless definition accross multiple files, this may not seem a big deal but it is actually for things like code generators.
18) so far ive only encountered 1 bug, which only shows up in release mode and is easily avoided.
cons :-
1) generics are limited when it comes to some things.
2) no macros which means you have to use generics but these dont get optimised so well.
and generics dont entirly replace macros so theres more cut and paste than id like.
3) structs cant inherit base structs, this has enourmous implications
4) properties dont fully look like field variables, ie you cant use them where you have a reference to a field variable, you cant modify the value of a property.
5) reflection :- its a bloody nightmare !
6) memory management, hmm, can hit performance but although you can avoid this and still write realy fast code using it you have to realyunderstand whats going on to avoid this which is damned complicated.
7) structs and classes are differenmt in ways which are so dificult to understand it seems they will probaly go on for decades
8) cryptic error messages if you try run it without .net installed
9) you cant use operators in generics, or it seems as ive just found out use operators in extension methods.
theres probably more but al i can think of of the top of my head.
ps you can have fixed arrays of value types in structs, however you cant have fixed arrays of structs which is a downer. (structs are actually value types)
pps
oh you cant have overloadable operators either which is kinda sucky, although some claim this is a good thing but i think those people are stupid.
Last edited by meow; 15-05-2009 at 22:53..
Reason: had to change it, again
|