Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Comments on Interpreted language: What is its benefit for being written in that way ?

Parent

Interpreted language: What is its benefit for being written in that way ?

+6
−0

Whenever I search in google why a specific language is interpreted language, I get differences between compiled languages and interpreted languages but nowhere the benefit for being interpreted rather compiled. Anyone please shed some light.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

Post
+8
−0

Historically, compiling programs could take a long time. Interpreted languages did not need to be compiled. So if developers wanted to change the program, if it was interpreted they could just tweak a few lines and run the program. If it was compiled, they had to wait until the compiler was done. This slowed down development.

Nowadays compilers are much faster, but even now compiling can take a long time if XKCD is to be believed.

Another advantage is platform-independence, although it comes at a price. The program isn't compiled for a specific architecture, so anyone who has an interpreter for the language can run it. Of course the key phrase is "anyone who has an interpreter for the language", so ironically this platform-independence comes at the price of less portability.

Interpreted languages also tend to come with a REPL, a Read-Eval-Print-Loop. The user can just enter commands and have them executed directly. If the program maintains the values of variables after finishing, the developer can inspect the state after the program has finished.
Note that compiled languages can have REPL's too, but they require some more effort to implement. As the linked Wikipedia article points out: " REPL support for compiled languages is usually achieved by implementing an interpreter on top of a virtual machine which provides an interface to the compiler."

Sources:
Avo, Sethi, Ullman - Compilers: Principles, Techniques, and Tools
http://itinterviewguide.com/interpreted-language/
https://www.ibm.com/support/knowledgecenter/zosbasics/com.ibm.zos.zappldev/zappldev_85.htm
https://en.wikipedia.org/wiki/Read–eval–print_loop

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

Not all compilers produce results targeting specific architectures or OS's (1 comment)
Not all compilers produce results targeting specific architectures or OS's
elgonzo‭ wrote over 3 years ago

With respect to "Another advantage is platform-independence, although it comes at a price. [...]". This seems to imply that the result of compilation will be "native code" that is specific to an architecture and/or OS. Which it often does, yes. But there are also compilers where the compilation result/target is byte code instead -- think Java, or the compilers of .NET languages such as C# and F#.