Disadvantages of C#??? just curious

C

chandu

Hello every body ,
upto now i saw advantages of C# only,i am curious about what are the
disadvantages of C#..(because any programming language should have some
positives and negatives..)

Thanks

Chandu
 
M

Michael Nemtsev

Hello chandu,

Can't be used in real-time systems as all .NET FW

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

c> Hello every body ,
c> upto now i saw advantages of C# only,i am curious about what are the
c> disadvantages of C#..(because any programming language should have
c> some
c> positives and negatives..)
c> Thanks
c>
c> Chandu
c>
 
K

Kevin Spencer

Can't be used in real-time systems as all .NET FW

This is a limitation of the .Net platform, not the C# language.

I'm not sure that any aspect of the C# language could be called a
"disadvantage," although some of the enhancements in C# 3.0 seem to provide
the ability to write less-readable code, such as implicit types and lambda
expressions.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
P

per9000

Hello every body ,
upto now i saw advantages of C# only,i am curious about what are the
disadvantages of C#..(because any programming language should have some
positives and negatives..)

Thanks

Chandu

Well, first of all it's a compiled language (with the pro's and con's
of that) as opposed to a script-language like Python. Secondly it is
compiled to Common Intermediate Language (CIL) so there is a second
"compilation": JIT (just-in time compilation). This makes it something
in between a script language like Python and a "native" language like
C - again this is comes with both pro's and con's. Python-people (and
others) tend to seem script-languages are faster for developing and
more flexible when updating parts of the system (no need to store
stuff in the GAC I guess). On the other hand I think complied
languages are little more robust and I guess faster since they are
compiled.

Since it is compiled to CIL you can pretty much extract your source-
code from f.x. an exe-file, a typical tool for this is Lutz Roeders
Reflector. This can be considered positive sometimes, and negative
sometimes.

An advantage of the CIL-stuff is that is can interface with all
classes and libraries of the .NET platform. As I see it this is the
main advantage of C# and any other .NET-language.

Since Microsoft is pretty much behind C# I fear, and at least some
people with me, that C# is a sort of "flavor of the decade" language -
meaning that in five to ten years it will be dead and replaced with
the next Microsoft "flavor of the decade". Compared to C that is a
very stable language that has been around for about 30 years and has
looked pretty much the same C# will not look like it does today in 10
years if it exists. (My personal opinion/guess/fear.)

Also, since I like conspiracies I think Microsoft is doing this to
make money (perhaps not only but at least partially), it must be nice
for them to force people to buy new stuff, reprogram that stuff and so
on at least once a decade. BUT: If you ask Microsoft they will reply
that they want to invent new stuff and lead in the technology race
instead of being second. And of course they are right. C#/.NET would
not be as excellent as it is if it had not been for the extreme effort
they have put into it. But still: I fear that C# will be a dead
language in 10 years (replaced with a new C-flavor), but that C will
still be running strong. (On the other hand the .NET framework seems
to be really important so I dunno really.)

When it comes to syntax you could perhaps prefer visual basic or some
other .NET-language, but that is a matter of taste (since C# and
VB.NET have (I guess) identical functionality).

HTH,

Per
 
P

Peter K

Well, first of all it's a compiled language (with the pro's and con's
of that) as opposed to a script-language like Python. Secondly it is
compiled to Common Intermediate Language (CIL) so there is a second
"compilation": JIT (just-in time compilation).

Note that the "language c#" itself does not as such require that anything
is compiled to CLI code. Microsoft's C# does compile to CLI, but
technically anyone could write a compiler for C# which compiles to any sort
of executable.

Since Microsoft is pretty much behind C# I fear, and at least some
people with me, that C# is a sort of "flavor of the decade" language -
meaning that in five to ten years it will be dead and replaced with
the next Microsoft "flavor of the decade". Compared to C that is a
very stable language that has been around for about 30 years and has
looked pretty much the same C# will not look like it does today in 10
years if it exists. (My personal opinion/guess/fear.)

But note that while C# may indeed have been developed at Microsoft it is
now an open standard, so not controlled by Microsoft. That is not to say
they won't make their own "extension". I think they did something like that
with C++.
 
B

Ben Voigt

chandu said:
Hello every body ,
upto now i saw advantages of C# only,i am curious about what are the
disadvantages of C#..(because any programming language should have some
positives and negatives..)

Support for small integral types is horrendous. Example:

byte a = 5;
byte b = 6;
byte c = a & b; // error!

Obviously, the bitwise and of two 8-bit numbers is also 8 bits. Except in
C#, it's 32 bits and you need a cast:
byte c = (byte)(a & b);

You can't even complement a byte:
byte d = ~a; // error
byte d = (byte)~a; // accepted

Absolute stupidity, if you ask me. (And yes, I know that local variables
could easily be made into ints... but when you're filling a byte array you
just can't get around the perpetual casting).

Oh, and the fact that it uses C-style casts. C++ introduced new,
specialized, self-documenting casts because the C-style ones tend toward
buggy code. Why should unboxing, query interface, and upcasts all use the
same cast syntax?

Lack of typedefs. Lack of free functions (there ought to at least be a way
to introduce a static class into name resolution).

And finally, the big one: lack of templates. .NET Generics can't express
certain constraints, so many things aren't possible.
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

Kevin said:
This is a limitation of the .Net platform, not the C# language.

I'm not sure that any aspect of the C# language could be called a
"disadvantage," although some of the enhancements in C# 3.0 seem to provide
the ability to write less-readable code, such as implicit types and lambda
expressions.

Yes, any new construct in a language offers the opportunity to write
less readable code, but correctly used it also adds the opportunity to
write more readable code. :)
 
P

per9000

But note that while C# may indeed have been developed at Microsoft it is
now an open standard, so not controlled by Microsoft. That is not to say
they won't make their own "extension". I think they did something like that
with C++.

INDEED, the MONO-project http://www.mono-project.com/ is an excellent
example of C# (et. al.) being used in under GNU FDL. I fear/suspect
that C# + MONO will outlive C# + Windows and that the two might
diverge soon. It should be technically impossible since, as you say,
C# follows a standard not governed my Microsoft.

BUT: Microsoft has a tendency to ignore standards and create formats
that are "close enough" and call those formats standards (like their
new image format). This will most likely be done by, in five years or
so, stop shipping/supporting C# compilers with SDK's and use compilers
for Cw (http://research.microsoft.com/Comega/) instead. By doing this
they sort of work around the C#-standard and after another five years
or so they let someone else govern the language specs for Cw and start
working on what I guess will be called C*.

STILL: If this is the case then C# + MONO will live on in the GNU-
world and might somehow be abandoned by the .NET framework, causing MS-
people to stop using C#, buy Visual Cw Studio ya-di-da and rebuild
their root-finding bisection algorithm in a new language (like buying
the white album from Beatles on LP in the 1970's, MC in the 1980's, CD
in the 1990's, DVD in the 2000's, etc. etc.).

AGAIN: this is my conspiracy theory and I might be completely wrong -
perhaps this message should be posted in alt.comp.lang.csharp
[:)]-|--<

ALSO: I am not saying that this is necessarily a bad thing - I am just
skeptic about the motives behind it all.


Per

--

Per Erik Strandberg
..NET Architect - Optimization
Tomlab Optimization Inc.
http://tomopt.com/tomnet/
 
J

jeepandy

Hello,

There are some carriable ways to use C# as an object-oriented language
with COM support in "realtime" Systems.
For Example: the XILINX FPGA's
In many develobment-systems C# is/or will be
supported.
This is realtime.
Yes, VHDL is the better choise, but C# is an easy
to use/learn language.

For Example: Graphics
For fast products you have to use DX or OpenGL.
GDI+ is only useful for simple ouputs. (2.0)
Maybe in 3.0 it will is faster.

Andy
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

chandu said:
upto now i saw advantages of C# only,i am curious about what are the
disadvantages of C#..(because any programming language should have some
positives and negatives..)

C# is pretty well designed so there are no big ooops's in it.

There are some things that are not part of the language and which
some people may want to have in the language:
- infinite size integers
- multiple inheritance
etc.

There are some things that is part of the language and which
some people may want to not have in the language:
- properties
- virtual/override
etc.

It can discussed forever whether curly brackets or begin end
is most readable etc..

I think only people with lack of imagination will not have
something to complain about but also that only people that
are whiners will not like the language.

It is well designed to doing all kinds of programming. It may
not be the best for everything (if you search back a couple
of months you will find someone that wrote an app in less
lines in F# than in C#) but good at everything or at
least everything I can think of.

Personally I like the fact that there are unsigned variants
of short/int/long and a signed variant of byte. This is
usually what is needed.

Arne
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Peter said:
Note that the "language c#" itself does not as such require that anything
is compiled to CLI code. Microsoft's C# does compile to CLI, but
technically anyone could write a compiler for C# which compiles to any sort
of executable.

True, but appendix D of ECMA-334 specify a subset of CLI (some classes)
that must be present in a compliant C# implementation.

Arne
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

per9000 said:
INDEED, the MONO-project http://www.mono-project.com/ is an excellent
example of C# (et. al.) being used in under GNU FDL. I fear/suspect
that C# + MONO will outlive C# + Windows and that the two might
diverge soon.

I do not see any indication of Mono taking over anything.

Indeed I see Mono having problems following the fast
release speed of Microsoft.

Arne
 
J

Jon Skeet [C# MVP]

Arne Vajhøj said:
I do not see any indication of Mono taking over anything.

Indeed I see Mono having problems following the fast
release speed of Microsoft.

Mono has problems keeping up with the framework - but it tends to
manage to get the *language* features released earlier than Microsoft
does, IIRC.

Frankly, I think MS is going to have to slow down the framework
development soon anyway - they've done an awful lot in 6 years, and I
think we could do with a bit of a break after LINQ has been released,
so everyone can catch up. Just MHO, of course. (Having said that, I
can't wait for CCR...)
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

Jon said:
Mono has problems keeping up with the framework - but it tends to
manage to get the *language* features released earlier than Microsoft
does, IIRC.

Doesn't Mono release every minor version to the public? That would mean
that the release rate of Mono can be much more frequent eventhough the
development rate of MS .NET is higher.
Frankly, I think MS is going to have to slow down the framework
development soon anyway - they've done an awful lot in 6 years, and I
think we could do with a bit of a break after LINQ has been released,
so everyone can catch up. Just MHO, of course. (Having said that, I
can't wait for CCR...)

Perhaps it will slow down somewhat, but I don't think that it will be by
much. I believe that one major reason that Microsoft has been able to
keep their .NET platform so dominant is that Mono has problems to keep up.
 
B

Brian Gideon

Frankly, I think MS is going to have to slow down the framework
development soon anyway - they've done an awful lot in 6 years, and I
think we could do with a bit of a break after LINQ has been released,
so everyone can catch up. Just MHO, of course. (Having said that, I
can't wait for CCR...)

Are you talking about the concurrency and coordination runtime?
That's already available as separate download from the robotics
studio. Or are you saying it is suppose to be part of the BCL in a
future release? Or have I reached acronym overload and have no idea
what I'm talking about? :)
 
J

Jon Skeet [C# MVP]

Göran Andersson said:
Doesn't Mono release every minor version to the public? That would mean
that the release rate of Mono can be much more frequent eventhough the
development rate of MS .NET is higher.

I didn't mention release *rate* - just release *availability*.
Perhaps it will slow down somewhat, but I don't think that it will be by
much. I believe that one major reason that Microsoft has been able to
keep their .NET platform so dominant is that Mono has problems to keep up..

I don't see Mono as being much competition to Microsoft, to be honest.
I hope it'll prove really useful for development on Linux, but I can't
see it moving Windows shops onto Linux in a significant way.
 
J

Jon Skeet [C# MVP]

Brian Gideon said:
Are you talking about the concurrency and coordination runtime?
That's already available as separate download from the robotics
studio. Or are you saying it is suppose to be part of the BCL in a
future release? Or have I reached acronym overload and have no idea
what I'm talking about? :)

I hadn't realised it had been released - thanks very much :) I know
there were some early access versions available, but not a proper
release. For a long time, virtually the only "documentation" about it
was the Channel9 video. In fact, without the word "robotics" from your
post, I still wouldn't have been able to find the download... it's
still not exactly obvious, and it would be nice not to have to download
something completely unrelated in order to get the CCR itself.

I don't know whether it'll be part of the BCL - without further
examination, I don't know whether I'd *want* it to be part of the BCL.
Being tucked away as part of robotics studio, however, I can't see it
getting as much use and examination as it possibly deserves though.
 
B

Brian Gideon

I hadn't realised it had been released - thanks very much :) I know
there were some early access versions available, but not a proper
release. For a long time, virtually the only "documentation" about it
was the Channel9 video. In fact, without the word "robotics" from your
post, I still wouldn't have been able to find the download... it's
still not exactly obvious, and it would be nice not to have to download
something completely unrelated in order to get the CCR itself.

I don't know whether it'll be part of the BCL - without further
examination, I don't know whether I'd *want* it to be part of the BCL.
Being tucked away as part of robotics studio, however, I can't see it
getting as much use and examination as it possibly deserves though.

If I remember correctly the Microsoft Robotics Studio was like a 50 MB
download or something. That's an awful lot of baggage considering I'm
only interested in the CCR. And you're right. It's an esoteric
placement since its usefulness goes far beyond robotics.
 

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