Apu Petilon

Greenhorn
+ Follow
since Apr 16, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Apu Petilon

Originally posted by Thomas Paul:
You said: C# is not compatible with C++.
You have now demonstrated that you don't know what you are talking about. A C# program can inherit from a managed C++ class. It can invoke methods of a C++ class (managed or otherwise). They can live together very happily in the .Net environment.


I didn't say you can't call C++ code from C#. I said C# is not compatible with C++ in the sense that the C# compiler will not compile C++ code the same way a C++ compiler compiles C code. C++ is compatible with C, but C# is not compatible with C++ in the same sense.


As far as indexers and properties, I can see how a VB programmer would be confused by them. But then most VB programmers have very little exposure to OO.


Indexers are just like operator overloading. Indexers and properties share the same traits as operator overloading. Again, the issue is not whether VB programmers are confused by them. The issue is that the feature encourages people to write non-obvious, hard-to-maintain code -- just like operator overloading.


And I wasn't telling you what to do with your time. I was making a suggestion that spending your time worrying about C# is a waste of your time. Why don't you let the C# programmers worry about their language and you worry about yours?


Why don't you let me worry about how I spend my time, and you worry about how you spend yours? How about that?


I still don't understand the obsession that Java programmers have with C#. Is it really that scary to you? Or is it really that important to you that you "prove" that Java is a better language? When you are finished with C# will you go argue with the Python programmers?


So the truth comes out. Your issue is not with me, but with Java programmers in general. I hope other participants of JavaRanch take notice. Why does any discussion of relative merits of these two related programming languages bother you so much? Why does any critical opinion about C# rile you up so much? And no, Python is not similar enough to Java to spur comparisons.
17 years ago

Originally posted by Thomas Paul:
So we agree that operator overloading is not a wise thing in a language in most cases.


The same goes for properties and indexers too, because they have the same defects as operator overloading. User-defined implicit type conversion operators are worse. VB4 came with a bunch of predefined implicit conversions, and this caused so many problems that VB programmers nicknamed this feature "Evil Type Coercion." Structs in C# was poorly thought out, and boxing/unboxing doesn't really unify the type system like they claim.

So what? In order for C# to be compatible with C++ it was included in the language. Perhaps it was a mistake but I think the fact that Microsoft was concerned about C++ developers is very commendable.


C# is not compatible with C++.


As far as the next release of C#, it could very well come from ECMA, not Microsoft.


That is a possibility. It is also a possibility that the next version of C# will come from Microsoft and the ECMA will be sidelined. That's what happened with COM+ and the Open Group.


And agian, since you have never posted to JavaRanch except to complain about C#, I consider you a troll. Why not spend your time helping Java developers become better Java developers instead of complaining about C#?


Take a look at the first article in this thread. I posted two links, one of which was highly favorable about C#. I also posted a few comments that are critical of C# but apparently you can't handle that, so I consider you hotheaded. And please don't presume to tell me what to do with my time -- being a moderator here doesn't give you that right.
17 years ago

Originally posted by Randall Twede:

glad someone finally thought about the poor slob who has to enhance or change code. i have never had to do that for any code but my own, but from this discussion i noticed right away what a nightmare it could be if i did have to and i didnt even know what an operator did.


Thank you for the kind words, Randall. Most programmers spend more time maintaining code written by other people than writing new code. More time will be spent reading and maintaining code than writing it in the first place. Because of this, code maintainability is more important than saving a few keystrokes when writing it initially. A lot of professional programmers ufortunately don't understand this. Hopefully I can convince a few people here.
17 years ago

Originally posted by Thomas Paul:
Wow, the language has 3 things that are harder than Java so the language is harder! Well, there are other things that are easier to do in C# so maybe Java is harder. So on a scale of 1 to 100, C# is .1 harder than Java. If you can't handle that then I suggest Visual Basic may be a good choice for you.


First, I don't know where you got the "3 things" from. Second, I am not talking about whether a feature is "harder". I am talking about whether a feature encourages people to write non-obvious, hard-to-maintain code. This has nothing to do with whether a feature is hard to learn or not.


As far as the examples from the "C# FAQ", the person who wrote that did it as a worst case scenario. He "despises" Microsoft and all Microsoft products. He constantly posts on the C# newsgroups to brag about how wonderful Java is. He is a jerk.


If you run out of arguments, resort to name calling. And they made you a moderator. How ironic!


As far as operator overloading goes, sometimes it si useful. Java said who cares let's eliminate it. C# says let's leave it in and have people use it wisely. Sure you can use it unwisely.


It is used unwisely more often than not. Many programmers know how to use operator overloading wisely. Far too many don't. Unfortunately, when an individual programmer uses operator overloading unwisely, it is not just he/she that suffers. The rest of us who get to maintain his code suffer too. This is the reason it is better to use a language that doesn't support operator overloading at all. After all, there are only a few circumstances (such as numerical computing) where the use of operator overloading is justified.


But there are plenty of language features in Java that are poorly done that can cause code confusion. That is what separates programmers from hackers.


Any language feature can be misused. Java eliminated the features that bring more pain than gain. Operator overloading is only one example.


Parts of .Net and C# have been given to ECMA. There will be a C# port because it has nothing to do with Microsoft.


First, the language by itself is not very useful. You need the libraries. Second, the current version of C# has been given to ECMA, but the next version may not be. (COM/DCOM was given to the Active Group, but COM+ was not, remember?)
[ April 22, 2002: Message edited by: Apu Petilon ]
17 years ago

Originally posted by Thomas Paul:
Apu, isn't is curious that you have never posted a single line in any other thread in JavaRanch ever? The only thing that you seem concerned about is C#. Does C# scare you that much? Or are you just a troll?
And I'm moving this to Meaningless Drivel because it has nothing to do with Java News.
[ April 22, 2002: Message edited by: Thomas Paul ]


I am not going to respond to your personal attacks because I don't think a lot of people here wants to read either your personal attacks or my response to them.
17 years ago

Originally posted by Thomas Paul:
This is simply not true. As a Java developer (6 years) who has learned C#, I can tell you that C# is not anymore complex than Java.


A disingenuous statement if I have ever seen one. If one language has properties, operator overloading, indexers, structs, implicit type conversion operators etc how can that language be no more complex than a language doesn't have any of those features? In C# the statement x.y += a\[b\]; can contain 10 hidden function calls. In Java the same statement can contain no function calls. Is C# as simple as Java? For more info see http://www.geocities.com/csharpfaq/test2.html

Originally posted by Thomas Paul:

And if operator overloading is such a problem, why does Gosling want to add it back to Java?


Gosling acknowledges that for numerical computing (as opposed to programming in general) operator overloading is useful. There is a right way and a wrong way for a language to implement operator overloading. The right way is to only allow overloading of special characters so that a maintenance programmer will have no problem spotting it. See Guy Steele's suggestion mentioned in Gosling's page: http://java.sun.com/people/jag/FP.html
The wrong way to do it is to allow ordinary operators such as + to be overloaded. This will cause code maintenance headaches as there will be no easy way to tell which + is just an ordinary addition, and which + is in reality a function call.

Originally posted by Thomas Paul:

I personally do not like operator overloading in most cases, but I think I am smart enough to use the tool only at the right time. Do you tell a carpenter that he can't have a drill because he might use it in the wrong place?


Some people suggest that if you don't like a feature x in a language just avoid x -- problem solved. In reality it is not as simple as that. For the school to be safe is it sufficient if your kid doesn't take a gun to school? No. You don't wany *any* kid to take guns to school. Unless there is a total ban on guns in school, the school will not be safe. Similarly, just because you avoid certain features of C# that doesn't mean your fellow programmers will too.

Originally posted by Thomas Paul:

Again the issue of WORA is not as clear cut as you might think. First there will be a Unix port of C#. Second, not every program requires WORA. Why should we always sacrifice speed in favor of WORA? If I am writing an application for a Windows environment, why should I suffer with the slowness of Swing for all my users just so that someday I can run this application in Linux?


Many years ago Microsoft told their customers that ActiveX (COM/DCOM) is open and portable. How many platforms is COM+ (the next version of COM) available on today?
[ April 22, 2002: Message edited by: Apu Petilon ]
[ April 22, 2002: Message edited by: Apu Petilon ]
17 years ago

Originally posted by Jessica Sant:
One of the best arguments I heard against the creation of C# was this:
When Java came around, there was a huge NEED for it. C/C++ required you to write to a particular platform. The "write-once, run-anywhere" of Java allowed you developers to write one platform and deploy to another (or any for that matter)... And then there's all the built in functionality (the .util* package for one)... and of course the fact that you don't have to worry about pointers!
With C#... it doesn't bring any major functionality to the table... -- it adds some neat enhancements, that have been listed above... but there are no major "oh-wow's" like there were with Java when it was first released


I agree tht WORA is one of the market demands that Java addressed. In fact WORA is the number one reason developers flocked to Java. But don't forget the #2 reason: Simplicity!!! Developers who had been burned by C++ wanted a simpler language. Gosling has said that simplifying C++ was one of the goals of Java.
What C# has done is to add all the complexity back to Java. Whether this is a good thing or not time will tell. With C# you have no WORA, and you have no simplicity. C# is in many respects more complex than C++.
Regarding operator overloading, please take the Test #2 in the C# FAQ http://www.geocities.com/csharpfaq and prepare to be shocked when you read the answer to Test #2. Also read the conclusions and recommendations at the bottom of the answer page.
Many of the "neat enhancements" that people talk about in C# are poorly done. Mostly they save typing at the expense of adding complexity. C# is like Perl in this respect. There are plenty of neat hacks in Perl that are designed to let you do a lot of things with very few keystrokes. But the side-effect is that Perl programs are notoriously hard to follow.
17 years ago
For a balanced view click both links:
http://www.geocities.com/csharpfaq
http://genamics.com/developer/csharp_comparative.htm
17 years ago