Question:
C# and javascript whats the diff?
anonymous
2013-03-08 10:37:23 UTC
Are they similar is c# used for the web like java script or is it more like c++
Three answers:
Unca Alby
2013-03-08 14:12:32 UTC
C is a higher-level language used for writing applications. It combines higher-level facilities with low-level system-type tools (e.g., direct bit manipulation).



C++ is an object-oriented (OO) version of C that adds stricter type controls to help keep programmers from making mistakes. C and C++ are usually used for command-line applications, but there are also windowing packages for C++ so you can make a C++ GUI app.



NOT to be confused with C# which is a Microsoft-created OO version of C, and otherwise has very little in common with C++. C# is part of Microsoft's .NET platform, and it's object code is interchangeable with that from other Microsoft .NET packages. You are limited pretty much to just Microsoft products, which isn't too bad given their huge market share.



Also not to be confused with Java which is another OO version of C. Java adds strict type controls and is almost exclusively OO. Where in C++ you can combine OO with non-OO in the same program, Java is OO almost to the point neurosis.



Java was designed to be "Write once, Run anywhere", and they accomplish this by using an interpreter into Byte Code instead of using a compiler. The Byte Code program (Java Runtime Engine) has to be custom written for each platform, so that the Java code should run the same. Doesn't always work that way, but that's the design goal. That's one reason it's a popular language for devices like Android.



Now, JavaScript is based more-or-less on Java. It is also a mostly interpreted language, and is interpreted by the web browser. It's different enough from Java to merit its own language category. Its type control is much less strict than Java, so it's incredibly easy for programmers to write Bad Code, and its OO syntax is completely different.



It is usually exclusive to web-browser clients, but I understand there is a server-side JavaScript now as well.
Terry
2013-03-08 18:20:10 UTC
Javascript is for client-side programming (web development)

C# is for programming applications.



FYI:

Javascript and Java have absolutely nothing in common. The Netscape browser added support for Java technology and changed the name of 'Livescript' to 'Javascript' as a marketing ploy to make Livescript more popular. Other than the name, there is no connection between the two.
?
2016-10-29 02:33:48 UTC
sure and no. sure, they're all scripting languages, and no they at the instant are not the comparable. JavaScript is a cyber web language at the same time as C# and Ruby are workstation languages. (those are the main alterations.)


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...