Discussion
Which programming paradigm emphasizes immutability and avoids changing state ?
Answer: C
The paradigm is functional programming.
Functional programming builds programs from pure functions, whose output depends only on their inputs and which have no side effects. Data is immutable: instead of changing a value, a function returns a new one. Haskell, Clojure and Erlang follow this style, which makes code easier to reason about and to run in parallel.
Object-oriented programming models objects whose state changes through methods, and procedural programming works by updating variables step by step. Logic programming, as in Prolog, states facts and rules, and its defining idea is inference, not immutability.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development