Compiled vs Interpretative & Application vs Scripting Language
Compiled vs Interpretative & Application vs Scripting Language
vs scripting language
Presentation
Compiled vs. Interpretative Languages
• Definition:
• Programming languages can be divided into two main categories based on
how they are executed: compiled languages and interpretative languages.
Compiled Languages
• These languages are converted into machine code before execution, resulting
in faster performance.
• Example: C, C++, Java (compiled into bytecode before running).
• Imaginative Example: Imagine writing a letter in English and translating it
into Spanish before sending it. The receiver reads the Spanish version
instantly without needing to translate.
Compiled Languages
• Examples: C, C++, Rust, Go, Java (compiled into bytecode).
• Real-world Application:
• C & C++ – Used in game development (e.g., Unreal Engine), operating systems
(Windows, Linux), and high-performance applications (financial trading systems).
• Rust – Used in systems programming and web assembly (e.g., Mozilla Firefox).
• Go – Used in cloud computing and backend development (e.g., Kubernetes,
Docker).
• Java – Used in Android app development and enterprise applications.
• How it applies to the real world:
Think of a compiled language like a fully cooked meal. Once prepared, you can
serve and eat it immediately without extra steps. Similarly, compiled
languages translate code before execution, making them faster and more
efficient.
Interpretative Languages
• These languages are executed line by line by an interpreter, making
debugging easier but execution slower.
• Example: Python, JavaScript.
• Imaginative Example: Imagine having a live translator interpreting each
sentence as you speak—it’s convenient but slower.
Application vs. Scripting Languages
• Definition:
• Programming languages are also categorized based on their use: application
languages (used to build software) and scripting languages (used to automate
tasks).
Application vs. Scripting Languages
• Examples: Python, JavaScript, Ruby, PHP.
• Real-world Application:
• Python – Used in data science (TensorFlow, Pandas), AI/ML, and web development
(Django, Flask).
• JavaScript – Runs in browsers to make websites interactive (e.g., animations,
form validation).
• Ruby – Used in web frameworks like Ruby on Rails for rapid web development.
• PHP – Powers dynamic web pages and CMS platforms like WordPress.
• How it applies to the real world:
An interpretative language is like having a translator in a conversation. You
speak in your language, and they translate it in real time. It allows for quick
testing but can be slower than precompiled code.
Application Languages
• Used to develop standalone applications (desktop, mobile, web apps).
• Example: Java (used for Android apps), C# (used for Windows apps).
• Imaginative Example: Think of building a house. Application languages
provide the bricks and materials needed for construction.
Application Languages
• Examples: Java, C#, Swift, Kotlin.
• Real-world Application:
• Java – Used for Android apps, banking systems, and enterprise solutions.
• C# – Used in Windows applications, game development (Unity Engine), and
enterprise software.
• Swift – Used for iOS and macOS app development.
• Kotlin – A modern alternative to Java for Android development.
• How it applies to the real world:
Application languages are like building materials used to construct houses,
cars, or gadgets. They allow developers to create full-fledged applications that
run independently.
Scripting Languages
• Used to automate tasks within a software environment, often requiring
another program to run.
• Example: JavaScript (runs in web browsers), Bash (used in command-line
automation).
• Imaginative Example: If application languages build houses, scripting
languages are like house automation systems that turn lights on/off based on
commands.
Scripting Languages
• Examples: JavaScript, Bash, PowerShell, Python (used in scripting).
• Real-world Application:
• JavaScript – Used for front-end web development, creating dynamic websites.
• Bash – Automates system administration tasks on Linux/macOS (e.g., backing up
files).
• PowerShell – Used in Windows for automating system management.
• Python (as a scripting language) – Used for writing automation scripts, web
scraping, and network administration.
• How it applies to the real world:
Scripting languages are like smart assistants that automate repetitive tasks.
They can schedule emails, perform system updates, or run background
processes without human intervention.
Questions and Answers
• What is the main difference between compiled and interpretative
languages?
• Why is Python considered an interpretative language?
• What type of programming language is used to build full software
applications?
• Why do web developers use scripting languages like JavaScript?