# 02. Compiled vs Interpreted languages

### A Comparison

| Compiled Language                                                  | Interpreted Language                                                           |
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
| The original program is translated into native machine instruction | The original program is translated into something else                         |
| Code is executed directly by Hardware                              | Code is executed by special program called Interpreter                         |
| Generally Faster and more efficient at run-time.                   | Comparatively slows at run-time.                                               |
| Additional compilation steps are required.                         | No compilation step is required. Program is ready to execute as soon as typed. |
| More control over hardware like and CPU and Memory.                | Hardware is generally not accessible.                                          |
| Examples : C, C++, Erlang, Haskell, Rust, and Go.                  | Examples : PHP, Ruby, Python, and JavaScript                                   |

### Blog Resources

{% embed url="<https://guide.freecodecamp.org/computer-science/compiled-versus-interpreted-languages/>" %}

{% embed url="<https://medium.com/@DHGorman/a-crash-course-in-interpreted-vs-compiled-languages-5531978930b6>" %}

### Video Resource

{% embed url="<https://www.youtube.com/watch?v=JNMy969SjyU>" %}
Compilation cs Interpretation
{% endembed %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://book.codewithgo.com/compiled-vs-interpreted-languages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
