In message <
[email protected]>
Tim Hobbs <
[email protected]> wrote:
> >>
> >> C# is not a scripting language. Neither is Java. They produce
> >> compiled applications. In the case of C# it relies on the .NET
> >> Framework, Java relies on the Java virtual machine. I'm sure you know
> >> all this anyway.
> >
> >Both are interpreted languages - they have to be or they could not be
> >run from a web page without a comilation stage. The JVM is the compiled
> >bit and holds the libraries for the interpeter to use.
> >
> >(See the site using Java that started this thread)
> >
>
> C# is compiled to bytecode. It is then just-in-timed to X86 code. I
> believe there are further options on exactly when it is it is JIT'd,
> but I'm not techy enough to go there.
>
What's bytecode? Do you mean assembly code? If it is complied, then
yes it has to be converted into assembler, or more accurately machine
code (the basic programming language of any machine, assembly is
one level above it - well, actually, some processors have micro code that
runs the machine code, but you'd not usually want to mess with that!) -
that's what compliers do. If it is interpreted, then the same is true,
but interpretation is usually quite a bit slower, and dynamic data
structures are very difficult to implement.
> There is no Java or C# code in that page. There is a reference to an
> applet and then the required parameter values. The code is in the
> applet. Your browser, and anyone elses, has the ability to accept or
> refuse that applet.
The applet is Java, it runs on the JVM. Certainly you can decide to
accept or refuse it - most people seem to (sensibly) have it turned
off by default.
The point is that Java will always do what you tell it, C# doesn't.
>
> Your original statement, that C# "has all the security taken out,
> leaving you PC wide open to nasties." is misleading. You are right to
> say that it is possible to write a program in C# that deletes files.
> Is it your position that only Microsoft have programming languages
> that can access the file system on a computer? That would certainly
> explain their popularity
I assume that's an attempty at jollity ;-)
>
> This is a fairly good, balance article on the relative merits of Java
> and C#. You probably won't like its conclusions though.
>
> http://genamics.com/developer/csharp_comparative.htm
>
I've seen all that sort of stuff before - it is a very similar debate to the
Pascal/Ada strong typing vs. the C/C++ lax typing. One side belive that
by having very strong typing of variables leads to better programs,
the other that lax typing allows better programming - a subtle difference,
but a major issue none the less.
In any debate on the relative merits of programming languages (there's
a very good argument that all programming should be done in assembler,
though with the size of modern applications that would be an interesting
challenge) it is very difficult to provide any statistics to back up a
view point, it's always down to the author to state their case, hopefully
in an objective manner. There's rather a lot of "I beleive's" in that
article rather than "the consensus appears to be" - I'm not saying
the author is right or wrong......
When I stared out in software I was a die-hard Pascal/Ada advocate, and
beleived C was the devils own work, but after many years programming I'm
now convinced the language seleted should reflect the applications aim.
C/assembler for embedded and applications that are not safety critical,
Ada etc for safety critical systems - that's not to say C can't be used
for such, Manchester Airports ground control system was written in C
and worked first time, on-time and has proved very reliable. There's
another system (I can't discuss the details) that could have cause a
tradgedy at sea if someone hadn't spotted a dodgy line of code after
it was in use - the program would not have compiled due to a type error
were it written in Ada, and possibly not with C++.
For my apps I write for the business I use C/C++, because its quick
and I can change my mind about what I'm doing without having to
go back and review the whole program design - not least as I don't
have one for my own apps!
I still maintain my position on the Java/C# issue though, as does
everyone I've known in the software engineering (as opposed to
programming) business - well, except those associated by employment
or contract with Mickysoft.
Richard
--
www.beamends-lrspares.co.uk [email protected]
Running a business in a Microsoft free environment - it can be done
Powered by Risc-OS - you won't get a virus from us!!
Boycott the Yorkshire Dales - No Play, No Pay