• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Interpretation and compilation !!

 
Ranch Hand
Posts: 55
Android Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
howdy geeks .... Can anyone elaborate the pros and cons of interpretation and compilation by distinguishing them ??? i need to know what kind of developers opt for compiler and interpreter ...which one suits the scenario of modern programming ???
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

vamsi acharya wrote:i need to know what kind of developers opt for compiler and interpreter ...which one suits the scenario of modern programming ???



It's rather what the programming language offers. In java we need both the compiler (for the compilation- to create the .class files) & the JVM (which interprets the .class files- converting .class to machine understandable code).
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know any developer who says "boy, i really prefer interpretation over compilation, so i'm only going to do use that". Most developers that I respect would say "What is the best tool for the job?" - and use that, regardless.

for example, for a lot of text parsing, Perl is great. It is interpreted.

for a lot of web stuff, Java is great. it is both interpreted and compiled.

For hardware drivers, C is great (i think). it is compiled.

And sometimes, you simply don't have a choice.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Usually, one of the pros for using an interpreted language is that you can often enter commands into some kind of utility app that provides a command environment for the language and have the statements automatically executed. Thus you get a more interactive approach to building applications.

Of course, nowadays the line between interpreted and compiled is getting very fuzzy. For example, both Windows PowerShel and Groovy are scripting languages that provide command line environments from which you can enter interactive commands. But behind the scenes they both compile the commands and execute the compiled code (in PowerShell it is my understanding that the commands are compiled twice - once to the .NET CLR op codes, and then by the just-in-time compiler into machine code).

Another pro for interpreted is that you can typically run the app on any OS that has an interpreter for that language (provided the app does not make use of OS-specific functionality).

One pro for compiled languages is that they typically run raster than interpreted. Another is that many compiled languages provide access to OS-specific functionality making them ideal for use for creating applications specific to an OS.

Note that Java is both an interpreted and compiled environment - the JVM will typically interpret Java bytecode until it reaches a threshold at which point it compiles bytecode into machine code and runs that. (This is JVM-specific, some JVMs such a JRockit always compiled the bytecode to machine code before running the Java app). By contrast. .NET is a fully compiled environment - the just-in-time compiler always turns .NET op codes into machine code before executing a .NET application.
 
vamsi acharya
Ranch Hand
Posts: 55
Android Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Peter Johnson wrote:Usually, one of the pros for using an interpreted language is that you can often enter commands into some kind of utility app that provides a command environment for the language and have the statements automatically executed. Thus you get a more interactive approach to building applications.

Of course, nowadays the line between interpreted and compiled is getting very fuzzy. For example, both Windows PowerShel and Groovy are scripting languages that provide command line environments from which you can enter interactive commands. But behind the scenes they both compile the commands and execute the compiled code (in PowerShell it is my understanding that the commands are compiled twice - once to the .NET CLR op codes, and then by the just-in-time compiler into machine code).

Another pro for interpreted is that you can typically run the app on any OS that has an interpreter for that language (provided the app does not make use of OS-specific functionality).

One pro for compiled languages is that they typically run raster than interpreted. Another is that many compiled languages provide access to OS-specific functionality making them ideal for use for creating applications specific to an OS.

Note that Java is both an interpreted and compiled environment - the JVM will typically interpret Java bytecode until it reaches a threshold at which point it compiles bytecode into machine code and runs that. (This is JVM-specific, some JVMs such a JRockit always compiled the bytecode to machine code before running the Java app). By contrast. .NET is a fully compiled environment - the just-in-time compiler always turns .NET op codes into machine code before executing a .NET application.



Thank you peter
 
My honeysuckle is blooming this year! Now to fertilize this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic