Need a new programming language
Alex Satrapa
grail at goldweb.com.au
Fri Feb 8 12:13:49 EST 2002
On Friday, February 8, 2002, at 05:24 , Richard Cottrill wrote:
> .. but I was just reading the comments about
> C# made by the guy who started GNOME (Miguel something-or-other). He was
> very positive about it. I think it has more potential for
> speed/compilation
> than Java; and it 'should' be neatly cross-platform.
>
> There are of course a fistful of reservations that every sane person has
> about anything developed by The Beast.
The potential for extracting greater speed out of C# only arises from
the fact that it starts off being slow and bloated. C# is just Java
with some reserved words changed, and a whole swathe of Windows-specific
classes added in to make life more interesting.
For a discussion of C# vs. Java, you may want to read
http://www.prism.gatech.edu/~gte855q/CsharpVsJava.html
To cut to the chase, this guy's main point is:
> "Most developers, especially those with a background in C or C++, would
> probably agree that features like operator overloading, pointers,
> preprocessor directives, delegates and deterministic object cleanup
> make C# more expressive than Java in a number of cases. Similarly, Java
> developers who learn C# will be pleasantly surprised at features that
> are missing in Java that will seem glaring in their absence once one
> uses them in C#, such as boxing, enumerations and pass by reference. On
> the other hand the lack of checked exceptions, inner classes, cross
> platform portability or the fact that a class is not the smallest unit
> of distribution of code makes the choice of C# over Java not a clearcut
> case of choosing more language features without having to make any
> compromises."
You may also want to read O'Rielly's take on the situation:
http://www.oreillynet.com/pub/a/dotnet/2001/06/14/csharp_4_java.html
The features of C# that most appeal to me are:
- No such thing as a "primitive" - everything's an object;
- Enumerations, so class-specific values can't have class collisions
with
values from other classes;
- foreach loops, similar to what you have in Perl;
- allowing variable numbers of parameters of the same type using
"params".
The features of C# that most disgust me are:
- All exceptions are unchecked - the compiler won't warn you
about uncaught exceptions;
- All methods are final by default - you can't just go overriding
a method when you need to; and
- No enforcement of source code layout, so there's no way to
visualise the class structure from the file system, and large
projects will get messy very quickly;
- Only runs on .NET platforms, which is a subset of Windows.
NB: I pronounce C# as "C hashed", since I don't see anything particular
sharp or witty about its design. The extra feature that C# has over
Java don't make up for the one's it's lacking - they're just bait to
trick people into switching to a Microsoft development platform.
I would like to see Java take on some of the features of C# - especially
the idea of eliminating those stupid annoying primitives, and allowing
enumerations. More syntactic sugar for loops (eg: foreach) and method
calls (eg: params) would be nice.
My main development platforms at the moment are:
- Mac OS X
- Linux
- Solaris
As such, Java works really well for me, and C# is unusable.
Regards
Alex
More information about the linux
mailing list