Is recursion the major argument for using a functional language? If not, what is?

What will be an ideal response?


Recursion is one of the features of functional languages that makes possible short and elegant solutions to many problems. Although recursion is a dominant mode of operation in functional languages, many procedural languages also support recursion, so that's not the major argument for using a functional language. Then what is the benefit of going to a functional language?A functional language allows for clarity of thought; data values are transformed by flowing, as it were, through a stream of mathematical functions. The programmer has no concern about where intermediate values are stored, nor indeed about how a "list" could occupy many memory cells. Another layer of abstraction has been offered to the programmer-the rarefied layer of pure mathematics. Because functions are described in a mathematical way by what they do to an item of data rather than by how they modify memory cells in the process of doing it, the possibility of side effects is eliminated. A side effect occurs when a function, in the course of acting on its argument values to produce a result value, also changes other values that it has no business changing. Implementing a function in a procedural language, where the major mode of operation is modification of memory cells, opens the door to potential side effects.

Computer Science & Information Technology

You might also like to view...

The analogy that best describes the process of assembling a JavaFX application and running it is

loading goods on a ship and then the ship departs b) a hummingbird alighting to drink nectar c) prepare a scene, put the scene on a stage, then open the curtains d) package an item, then ship it to its recipient e) None of these is an appropriate analogy

Computer Science & Information Technology

Which of the following is the software package that manages Cisco licenses and is typically installed on a computer?

A) PID B) PAK C) CLM D) UDI

Computer Science & Information Technology

The item in the accompanying figure is the Toggle text ____ tool.



a. resolution
b. orientation
c. spectrum
d. aspect ratio


Computer Science & Information Technology

What are common keyboard events? What is the delegate used to create a keyboard event handler, and what is the type of the second parameter to the event handler?

What will be an ideal response?

Computer Science & Information Technology