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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/12/11 13:11
Read: times


 
#184678 - Not always worth it with interpreted languaes
Responding to: ???'s previous message
Andy Neil said:
Indeed - but I was talking about the specific claim that removing the "build" step is an "advantage"

It is normally only on minimalisting target platforms, where it is a important advantage to remove the build step. That was why all our early microcomputer platforms had to settle for interpreted languges. They had a very simple and small "text-to-token" filter. And then they walked through these tokens, running a minimalisting virtual machine.

Today, compiler technology have reached a level where there exists a number of incrementative compilers. They can process a source file, pick up the single changed function, generate new virtual or native machine code for that function and then perform an incrementative linking with the rest of the program in almost zero time.

A number of compilers/linkers can even do that in the middle of a debugging session, and patch the running program on-the-fly and then let the developer continue single-stepping after having fixed the error. After the debugging has ended, the patched binary can be thrown away and the linker can create a fresh binary that does not contain the buggy code blocks that was patched around.

In the end, there are only really four situations (that I can see) where interpreted are good:
1) When the interpreter must run on the same hardware, and that hardware is tiny.
2) When target transfer times are very slow, so we don't want external builds and then wait for uploads but instead want to be able to make patch the application directly inside the target.
3) When there is a big advantage to be able to run self-modifying code - like having an end user supply a complex formula to a graphing web service.
4) When the language itself is extremely suitable for a specific problem, and there are no suitable alternative of a compiled language (too high price, not possible to run on target, licensing restrictions, ...)

I was pretty sure I had a fifth reason for interpreted solutions too, but sems to have dropped out of my mind while I was writing the first four. ;)

List of 17 messages in thread
TopicAuthorDate
Interpreted Languages?            01/01/70 00:00      
   Sometimes it's hidden            01/01/70 00:00      
      p-code            01/01/70 00:00      
      P-code and others            01/01/70 00:00      
      interpreter/compiler            01/01/70 00:00      
         Debatable            01/01/70 00:00      
            Not necessarily machine code            01/01/70 00:00      
               Definitely debatable            01/01/70 00:00      
                  Ofcourse not            01/01/70 00:00      
   runtime errors            01/01/70 00:00      
      You can't            01/01/70 00:00      
      You missed the point!            01/01/70 00:00      
         Not always worth it with interpreted languaes            01/01/70 00:00      
            I like your thinking            01/01/70 00:00      
               Many FORTH implementations are interpreted, aren't they?            01/01/70 00:00      
                  Forth            01/01/70 00:00      
   Maybe a comparison?            01/01/70 00:00      

Back to Subject List