[LONG] C# too sharp for me

J

Jon Skeet [C# MVP]

<"Richard Blewett [DevelopMentor]" <richard at nospam dotnetconsult
dot said:
You can create synchonrized methods in C#.

Yes - it's not part of the actual language though, which was what I was
comparing. I should have made that clearer though.
I wouldn't recommend it as it
tends too lead to very coarse grained locking

Likewise.
 
G

Guest

In what way is C# *simpler* than Java? The way I see it, it's more
complicated than Java, as a language. If we consider Java 1.4 vs C# 1.0
(which is roughly fair, as would be Java 1.5 vs C# 2.0) then:

I not going to fight a Holy War, although I'm amused to have drawn such a
sharp response. By simpler, I mean easier to learn and use. Obviously, some
added features make a language easier, some have potential to make it harder.
(Is a car with an automatic choke simpler or more complicated than one with a
manual choke?) There is no point is differentiating between complexity in the
language per se and libraries; they are both in the mix. A lot of the
complication in Java is due to the desire for universality over machines and
cultures. So far, I've seen nothing in C# to rival the mysteries of
GridBagLayout, or LayoutManagers, in general. Nor has C# forced me to the
extremity shown below for formatting anumber. And I heard of a Java program
that was found to be spending 60% of its time creating new Gregorian
calendars....

As noted by someone else, you basically cheated on your list. Several of the
entries (properties, attributes, events,...) are things that are also easily
done in Java, perhaps under a different name.

I do find that delegates and events in C# are harder to understand (so far)
than the Listeners in Java. I may catch on eventually. I am amazed that there
isn't a properly defined DateBox control in C# (whine, whine, whine) that
implements a Windows standard date entry. (Data entry people HATE the
DateTimePicker.)

eye

class bcFormat{
DecimalFormat DF0d;
DecimalFormat DF1d;
DecimalFormat DF2d;
DecimalFormat DF3d;
DecimalFormat DF4d;

public bcFormat(){
Locale l = new Locale("en","US");
//Locale l = new Locale("fr","FR");
DecimalFormatSymbols dfs = new DecimalFormatSymbols(l);
DF0d = new DecimalFormat("###,###,###",dfs);
DF1d = new DecimalFormat("###,###,###.0",dfs);
DF2d = new DecimalFormat("###,###,###.00",dfs);
DF3d = new DecimalFormat("###,###,###.000",dfs);
DF4d = new DecimalFormat("###,###,###.0000",dfs);
}// end constructor
}// enc bcFormat
 
K

kevin cline

eye5600 said:
So far, I've seen nothing in C# to rival the mysteries of
GridBagLayout, or LayoutManagers, in general.

There's noting in Windows Forms with the functionality of GridBadLayout
either. If you want dynamic layouts you have to roll your own.
 
J

Jon Skeet [C# MVP]

eye5600 said:
I not going to fight a Holy War, although I'm amused to have drawn such a
sharp response.

I wouldn't say my response was sharp - just amazed, given how easy it
was for me to compile those two lists.
By simpler, I mean easier to learn and use. Obviously, some
added features make a language easier, some have potential to make it harder.
(Is a car with an automatic choke simpler or more complicated than one with a
manual choke?) There is no point is differentiating between complexity in the
language per se and libraries; they are both in the mix.

I'm afraid I disagree with pretty much all of this. To me, there's more
to learn in C#, therefore it's a less simple language. It's certainly a
joy to use, but I don't think it's simpler.

There's *definitely* a distinction to be drawn between language and
libraries - especially as in both cases multiple languages target the
same libraries. The design of the languages can be discussed entirely
separately from the design of the libraries.
A lot of the complication in Java is due to the desire for
universality over machines and cultures.

I'm not sure I'd agree with that. It has better support for
internationalisation in some respects, and worse in others. Its
encoding support isn't nearly as well thought out as .NET's, but its
date/time handling, while more complex than .NET's (partly due to
having about three goes at it) is definitely better.

I really can't say I find Java complicated - and as a language, I still
believe it to be simpler than C# (pre-1.5, at least; generics bring a
whole different ball-game in there).
So far, I've seen nothing in C# to rival the mysteries of
GridBagLayout, or LayoutManagers, in general.

No, more's the pity. Fortunately, flexible layout management (which is
sorely missing, or at least underplayed)
Nor has C# forced me to the
extremity shown below for formatting anumber.

I can't say I've often had to use five different number formats varying
only by precision in the same program, personally...
And I heard of a Java program that was found to be spending 60% of
its time creating new Gregorian calendars....

Then someone wasn't being careful enough - it's very easy to avoid
that, in almost all situations. It's easy to fall into performance
traps on both platforms.
As noted by someone else, you basically cheated on your list. Several of the
entries (properties, attributes, events,...) are things that are also easily
done in Java, perhaps under a different name.

They're in no way part of the language though. Just because the pattern
can still be followed doesn't make them part of the language. Does C
have namespaces? No. You can follow a pattern of prefixing all function
calls with a namespace, but that's not the same as the language having
a namespace feature.
I do find that delegates and events in C# are harder to understand (so far)
than the Listeners in Java.

Interesting - I find exactly the reverse is true. I love C# events and
delegates. The biggest thing I miss in Java is the "using" statement,
to be honest. I very rarely need explicit try/finally blocks in C# :)
I may catch on eventually. I am amazed that there
isn't a properly defined DateBox control in C# (whine, whine, whine) that
implements a Windows standard date entry. (Data entry people HATE the
DateTimePicker.)

Not being a data entry person, it hasn't bothered me much. Most of what
I miss when writing C# is the excellence of Eclipse in terms of
navigation, refactoring and unit testing. Some of that will change,
with any luck with VS 2005. What won't change (at least for a while) is
C#'s lack of an equivalent to Java 1.5's enums which, while
occasionally a little rough around the edges, are incredibly handy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top