Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • harvard1
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
A comparison of functional and object-orientedprogramming paradigms in JavaScript
Blekinge Institute of Technology, Faculty of Computing, Department of Software Engineering.
Blekinge Institute of Technology, Faculty of Computing, Department of Software Engineering.
2017 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesis
Abstract [en]

There are multiple programming paradigms that have their own set rules forhow code should be written. Programming languages utilize one or multiple ofthese paradigms. In this thesis, we will compare object-oriented programming,that is the most used today with languages such as C++ and Java, and functionalprogramming. Functional programming was introduced in the 1950's butsuered from performance issues, and has not been used much except for in theacademic world. However, for its ability to handle concurrency and big data,functional programming is of interest in the industry again with languages suchas Scala. In functional programming side effects, any interaction outside of thefunction, are avoided as well as changing and saving state.

To compare these paradigms we have chosen four dierent algorithms, whichboth of us have implemented twice, once according to object-oriented programmingand once according to functional programming. All algorithms were implementedJavaScript. JavaScript is a multiparadigm language that supportsboth functional and object-oriented programming. For all implementations,we have measured development time, lines of code, execution time and memoryusage. Our results show that object-oriented programming gave us betterperformance, but functional programming resulted in less code and a shorterdevelopment time.

Place, publisher, year, edition, pages
2017. , 48 p.
Keyword [en]
Functional programming, Object-oriented programming, Comparison, Programming paradigms, JavaScript
National Category
Computer Systems
Identifiers
URN: urn:nbn:se:bth-14717OAI: oai:DiVA.org:bth-14717DiVA: diva2:1115428
Subject / course
PA1445 Kandidatkurs i Programvaruteknik
Educational program
PAGPT Software Engineering
Supervisors
Examiners
Available from: 2017-06-28 Created: 2017-06-26 Last updated: 2017-06-28Bibliographically approved

Open Access in DiVA

fulltext(838 kB)27 downloads
File information
File name FULLTEXT02.pdfFile size 838 kBChecksum SHA-512
50ad16aaa8dc6c372d02f19137d6397beab1018876504adf30f250de51c3b9c22bf39548df9cf280567a40efdc5e5c62214757ade056006c303d84cd5a4c4626
Type fulltextMimetype application/pdf

By organisation
Department of Software Engineering
Computer Systems

Search outside of DiVA

GoogleGoogle Scholar
Total: 27 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

Total: 167 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • harvard1
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf