The Artima Developer Community
Sponsored Link

Java Buzz Forum
My C# Testdrive

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Marc Logemann

Posts: 594
Nickname: loge
Registered: Sep, 2002

Marc Logemann is founder of www.logentis.de a Java consultancy
My C# Testdrive Posted: Aug 1, 2004 5:47 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Marc Logemann.
Original Post: My C# Testdrive
Feed Title: Marc's Java Blog
Feed URL: http://www.logemann.org/day/index_java.xml
Feed Description: Java related topics for all major areas. So you will see J2ME, J2SE and J2EE issues here.
Latest Java Buzz Posts
Latest Java Buzz Posts by Marc Logemann
Latest Posts From Marc's Java Blog

Advertisement

I donwloaded C# Visual Studio 2005 beta to play around with C#. Its told that you should know your enemy ;-) But i went a step further, i also bought OReilly's Book "C# in a Nutshell", which is as good as the Java Nutshell series. Here is my totally biased conclusion of C# after 3 hours work:

* the so much hyped Properties in C#, which are implemented at the language level, in contrast to the well know JavaBeans, which are only a convention, seem elegant, but i wont kill for that feature. Its nice, but not too important at all. The point that you write less code is irrelevant in modern IDEs. As i can see it, Properties are only compiler magic, compared to generics in java.

* their keywords for controlling polymorphism are .... hmmm... ugly. I mean, allways prefixing my methods with "override" just because i want to override is a pain. I know they have done it because you can also declare a method as "new" which means that you can hide a base class method and of course you have the virtual flag, which help with versioning issues when changing runtime classes. All in all, there is not too much benefit but a crazy syntax. I mean how often do you use a method name in a class in your app which is derived from a system class with getting troubles after upgrading to a newer SDK because the vendor has used the same method name as you. After all, i dont like the way C# handles polymorphism.

* Indexers are pretty much the same than properties in C# but working on Array members. Again, nice to have it, but if you dont have it, you wont die.

* using statement (not keyword) for implicitly closing a resource after you are finished is a really cool idea and helps beginners in managing their resources. Often i see all those Streams which are not closed in the finally block.

* ref modifier in signatures and method calls. This is somewhat hard to judge. I mean it opens some more ways to manipulate data and at the end you can write more void methods and nevertheless change data outside the method. So its useful yes, but its dangerous too without solving too much. I dont know if i like it or not.

* the params modifier is cool and it is so cool that Tiger also supports this VarArgs constuct.

* generics + autoboxing, also cool stuff also implemented in Tiger. So we can thank Microsoft for creating this language with this features, otherwise we wouldnt have seen this features in tiger in any way.

* structs, again something where people are given more power and more control over how programs perform and how apps use memory. Its like the ref modifier. They give you more freedom and power, but we all know where this ends when used from the wrong people. Again, to me its a nice feature, but it should be treated with some attention.

* Delegates have potential, but to me it only makes sense in event handling stuff, primarily in GUI applications. The problem is you can misuse them instead of using Interfaces. Summary: i like them, but only in the correct places.

* operator overloading. I see it like SUN, it doesnt give you so much, put it can be a pain in the ass to debug other peoples code with operator overloading involved.

* switch statement. Microsoft got it right, for years i am getting upset when thinking about the ill-engineered switch in java, only accepting ints as expression. With C# you can put String into the expression.

* pointers, i dont want them and i dont like them. C# has them.

There is much more to say, but this would need some more coding and perhaps i will write some more in some months. My overall conclusion is that C# has learned from Java in a great way. They copied most of the java behavior and syntax and added some really nice features, where most of them will be seen in Tiger. Sometimes they implemented too much in my oppinion (operator overloading, pointers, the virtual stuff) but the language is not bad at all. I dont have to say that VS 2005 is a damn good IDE, because also the last java developer should know that allready.

But i am wonedering that even with XP, you dont get the Runtime. It remembers me of the Java runtime issue, but Microsoft is the OS provider, so i wonder why you still have to download the runtime manually. I expected that they would ship that with a SP in Win2000 for example.

Read: My C# Testdrive

Topic: Comics question Previous Topic   Next Topic Topic: Incoherence

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use