Functional languages vs. imperative languages - Essay Example

Only on StudentShare

Extract of sample
Functional languages vs. imperative languages

Imperative languages are greatly influenced by the von Neumann architecture due to their high dependency on an instruction counter and a store. They have control structures, like for loops and while loops, which make incremental changes to the memory while iterating over instructions. Programs written in imperative languages are statement oriented, and their principle operation is the assignment of values to variables; in other words, computation is performed with side-effects (Lee 118).
Unlike imperative languages, functional languages do not rely on the Von-Neumann architecture as they do not have any concern with variables but only data objects and values. The principle operation of functional languages is function application, and they treat functions as first-class objects that may be stored in data structures, passed as parameters, and returned as function results. Programs written in functional languages contain no variables, loop statements, and assignment statements, and use parameters and return values to communicate values; in other words, computation is performed with no side-effects (Lee 119).
Imperative languages heavily rely on side-effects to implement their state and perform their operations. On the other hand, functional languages lack side-effects which allow them to always produce the same result when given with the same parameters. This characteristic of functional languages is called ‘referential transparency’ which makes the semantics of these languages far simpler than the semantics of imperative languages (Kedar and Thakare 6-4).
In functional languages, the return value of the function can be of any data type including function type. But this is not possible in imperative languages; functions defined in imperative languages are restricted to return values of specific data types (Kedar and Thakare 6-4).
Programs written ...
Download paper


A program written in any of these languages contains variables which are declared and assigned with values, and changes in the…
Author : margaretteframi

Related Essays

Database Structures, Languages, and Architectures SLP
2 pages (502 words) Research Paper
Comparison of Scripting Languages
5 pages (1255 words) Research Paper
research paper on object oriented programming
1 pages (251 words) Research Paper
High-level languages and low-level languages
4 pages (1004 words) Essay
The future of computer logic and programming with Python
5 pages (1255 words) Essay
One size fits all datatypes
1 pages (251 words) Essay
As a software developer give examples of where you use abstraction in your daily job
2 pages (502 words) Essay
Got a tricky question? Receive an answer from students like you! Try us!