Assignment #2: Comparing Languages

  1. Diff between Compiled Language Vs Interpreted Language Vs Declarative Language?

Ans:

Compiled LanguageInterpreted LanguageDeclarative Language
-translators that generate machine code from source code-step-by-step executors of source code, where no pre-runtime translation takes place-a program specifies what is to be done rather than how to do it

2. Example of Declarative Lang?

SQL and Prolog etc.

3. Pros and Cons of Declarative Lang?

ProsCons
Short, efficient codeSometimes hard to understand for external people
Can be implemented using methods not yet known at the time of programmingBased on an unfamiliar conceptual model for people (solution state)