Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Per Westermark
05/11/12 12:32
Read: 387 times

#187324 - interpreted languages are more than "throw away code"
Responding to: Erik Malund's previous message
Erik Malund said:
Thus IMHO interpreted languages has no plce but "throw away code" i.e. code made for a rarely/never repeating function.

The majority of web sites you visit are running services written in interpreted languages, i.e. not "throw away code".

One thing with interpreted languages is their ability to run "self-modifying code" - they can often evaluate the contents of a text string. So if you want to plot a curve, you enter the formula in an input field, and then have the interpreter compute that formula for the selected variable range.

Another thing is that it allows partial updates with maintained service. So you can have many page requests/second and then from one access to the next have switched in a bug-fix or a correction of a spelling error. The complexities of doing the same with a compiled language, and dynamically "rotating" which combination of DLL files that should be used without affecting the service can be extreme.

Yet another thing here is that it separates the source code from the target architecture. So the same source code can work on a large number of architectures with zero changes. A php web page don't care if it's run on a machine with x86, PPC, MIPS, ...

And a language like Java, where you only convert to byte-code (with optional just-in-time compilation to native machine instructions in destination machine) allows a developer to write a single java application that can run on a huge number of platforms. Who would manage to write mobile applications if they needed 200 mobile phones and needed to compile and test 200 binaries?

Another thing here is that it is normally very easy to distribute minimal delta updates for services written in an interpreted language compared to sending out new binaries. Even a tiny change in a compiled application normally gives a large number of changes in the produced binary, because of changes in addresses of lots of variables and functions. If you are about to update 10 000 devices over the air, the size difference can be quite important.

What would happen if we didn't have SQL for accessing databases, but was required to compile binary "apps" for each query?

In the end, interpreted languages aren't just there for the ease of the programmer, but because their ability to solve problems for the end user (who doesn't see any code) that are not easy to solve with compiled languages.

List of 15 messages in thread
Interreted Languages - revisited      Andy Neil      05/09/12 16:03      
   No Tools?      Neil Kurzman      05/09/12 18:25      
      Interpreted is always problematic for complex problems      Per Westermark      05/10/12 05:37      
      It's more than just syntax      Andy Neil      05/10/12 15:49      
         lint isn't really a syntax checker      Per Westermark      05/10/12 17:39      
            Yea That      Neil Kurzman      05/11/12 00:08      
            Static code analyser      Oliver Sedlacek      05/11/12 03:24      
      Exception handling      Oliver Sedlacek      05/11/12 03:26      
         exceptions are normally too little too late      Per Westermark      05/11/12 04:47      
   the issue with interpreted languages is ...      Erik Malund      05/11/12 08:58      
      interpreted languages are more than "throw away code"      Per Westermark      05/11/12 12:32      
         I hate throwing objects in the cogs, but...      Justin Fontes      05/11/12 15:20      
            Someone else responsible for compiling the interpreter      Per Westermark      05/11/12 17:53      
            But the same applies to compiled languages!      Andy Neil      05/12/12 04:27      
      Disagree      Andy Neil      05/11/12 13:29      

Back to Subject List