Programming vs. Markup vs. Scripting?

Can someone explain to me in BASIC and easy-to-understand words what the difference is between the following three:

(1) Programming Languages (C, C++, Java etc...)
(2) Markup Languages (CSS, HTML, XHTML etc...)
(3) Scripting Languages (JavasScript)

What exactly is the dividing line between these three?

Scripting is usually easy, and you do it for existing applications (eg. lua for videogames, js for web clients, php for web servers).
Applications aren't made in scripting language since they are relatively slow, but they are easy to mantain & update.

Programming is usually done from the people who "has a clue".
You cannot just assume everything, and it can be used to both make or expand applications. Since applications can also get expanded by scripts, programming is mostly used to make new applications (you'd have to pay a lot more if your website was in C++ instead of PHP, i believe). Hardest one to update, unless you got to deal with major problems beforehand.

Markup is mostly static contents. You don't have if,for,while in HTML. You have to use scripting languages for dynamic contents. You rely on other applications to display and handle markup correctly. 50% updating difficulty.

I'd like to give more details but I'm off to work right now.
Can someone explain to me in BASIC and easy-to-understand words what the difference is between the following three:

(1) Programming Languages (C, C++, Java etc...)
(2) Markup Languages (CSS, HTML, XHTML etc...)
(3) Scripting Languages (JavasScript)

Scripting languages are programming languages too. As opposed to C,C++, Java, etc, they are interpreted languages. Programs of interpreted languages exist simply as text files written by the programmer in the language. When you run the program, the interpreter looks at the program line by line, and converts the code to machine instructions and runs it as it goes along.

With compiled languages, such as C, C++, Java etc, the code is pre-converted to the form that you computer needs it in to run it ( although Java is a little complicated in that it runs on a virtual machine ). Compiled programs are usually much faster than interpreted programs, however, they tend to be more complex languages and the process of building and running the application takes longer, and the compiled program is usually less portable ( you might need to recompile it for different operating systems ). Because there is no demand to quickly and sequentially scan and run the code from it's raw text form, there is plenty of time and room for optimization.
Last edited on
Programming languages and scripting languages are quite similar these days. You can create a program in both, but a scripting language is a language that is interpreted while a programming language is compiled to machine code. (Java is in a grey area because Java is compiled into an interpreted bytecode, but some processors can run this bytecode directly)

Markup languages are a set of tags assigned to elements of a text to indicate their relation to the rest of the text or dictate how they should be displayed. (from google)
What do you guys mean by "interpreted language"? Can you elaborate more on that?

An interpreted language isn't "compiled" in the same way that C++ may be. There's no special file format; the parser just reads the code line-by-line and produces machine code as a result. This is why when you install, say, Python, you can write code right in the little command-prompt window that pops up when you run it.
This is not that simple. Many compiled languages also have some kind of interactive command shell. Java and C# can be partially interpreted, while some "scripting" languages can be actually compiled on the fly (JIT).
That's the main difference is how the language gets from text to 'actually doing something'.

A compiled language has a compiler (and linker, etc) which takes the program text and converts it to executable code (like an .exe and .dll). After that, you don't need the compiler (and linker, etc). All you need is the produced .exe and whatevers.

An interpreted/scripting language has a program that must be running to make stuff happen. This can be called things like a 'shell', a 'run time environment', an 'interpreter', etc. The advantage is that you can convert text to 'actually doing something' at any time, among other things (like runtime introspection and self-modifying programs). This program that must be running can be part of another application, of course.

This difference does influence the language design, significantly, but you can certainly do things like compile a python program or interpret a C++ program.
Topic archived. No new replies allowed.