??? 05/11/12 18:32 Read: times |
#187324 - interpreted languages are more than "throw away code" Responding to: ???'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. |
Topic | Author | Date |
Interreted Languages - revisited | 01/01/70 00:00 | |
No Tools? | 01/01/70 00:00 | |
Interpreted is always problematic for complex problems | 01/01/70 00:00 | |
It's more than just syntax | 01/01/70 00:00 | |
lint isn't really a syntax checker | 01/01/70 00:00 | |
Yea That | 01/01/70 00:00 | |
Static code analyser | 01/01/70 00:00 | |
Exception handling | 01/01/70 00:00 | |
exceptions are normally too little too late | 01/01/70 00:00 | |
the issue with interpreted languages is ... | 01/01/70 00:00 | |
interpreted languages are more than "throw away code" | 01/01/70 00:00 | |
I hate throwing objects in the cogs, but... | 01/01/70 00:00 | |
Someone else responsible for compiling the interpreter | 01/01/70 00:00 | |
But the same applies to compiled languages! | 01/01/70 00:00 | |
Disagree | 01/01/70 00:00 |