kth.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • 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
Extending a Functional Programming Language with Object-Oriented Concepts: A Case Study on Elixir
KTH, School of Electrical Engineering and Computer Science (EECS).
KTH, School of Electrical Engineering and Computer Science (EECS).
2024 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesisAlternative title
En Påbyggnad av ett Funktionellt Programspråk med Objektorienterade Koncept : En fallstudie i Elixir (Swedish)
Abstract [en]

In the world of programming languages, functional and object-oriented languages are often viewed as opposing forces competing for dominance. Functional languages contain immutable data structures as well as a focus on pattern matching and recursion. Object-oriented languages contain objects and classes along with features such as inheritance and polymorphism. In reality, concepts from either are far from incompatible, with many aspects of the functional programming paradigm today finding their way into imperative and object-oriented languages, as well as vice versa.

This thesis aims to examine how these two paradigms can be united in a language that does not initially mix the two by extending the functional programming language Elixir with concepts from the object-oriented programming paradigm. Both paradigms were studied and their core features defined, which guided the design of an extension that aims to unite these concepts as intimately as possible.

The resulting implementation was evaluated using a set of test programs displaying the extension's features. The limitations of the extension were discussed and the conclusion was drawn that a unification of the two paradigms, functional programming and object-oriented programming, had been achieved through the extension of Elixir.

Abstract [sv]

Detta examensarbete ämnar djupare utforska koncepten bland de funktionella och objektorienterade programmeringsparadigmen. Funktionella språk innehåller koncept som icke-muterbara datastrutkurer tillsammans med en fokus på mönstermatchning och rekursion. Objektorienterade språk å andra sidan innehåller koncept som objekt och klasser, tillsammans med arv och polymorfism. De två paradigmen anses ofta vara två oförenliga, motgående krafter, men sanningen är långt ifrån sådan, då många olika aspekter av den funktionella paradigmen ofta hittar ett hem i annars objektorienterade programspråk, samt vice versa.

Arbetet undersöker därmed möjligheten att förena de två paradigmen, genom att skapa en påbyggnad till det funktionella programspråket Elixir med koncept från den objektorienterade paradigmen. Båda paradigmen undersöktes för att etablera varderas centrala koncept. Dessa koncept användes sedan för att designa och implementera påbyggnaden på ett sätt som förenar koncepten så nära som möjligt.

Implementationen utvärderades sedan med en uppsättning program som visar påbyggnadens funktionalitet. Påbyggnadens olika begränsningar diskuterades och slutsatsen drogs att föreningen av de två paradigmen hade uppnåtts genom påbyggnaden till Elixir, på ett sätt som uppfyller kraven som ställdes.

Place, publisher, year, edition, pages
Stockholm: KTH Royal Institute of Technology , 2024. , p. 61
Series
TRITA-EECS-EX ; 2024:456
Keywords [en]
Functional Programming, Object-Oriented Programming, Elixir, Macros, Programming Paradigms
Keywords [sv]
Funktionell Programmering, Objektorienterad Programmering, Elixir, Makro, Programmeringsparadigm
National Category
Computer Sciences Computer Engineering
Identifiers
URN: urn:nbn:se:kth:diva-351540OAI: oai:DiVA.org:kth-351540DiVA, id: diva2:1887664
Educational program
Bachelor of Science - Information and Communication Technology
Presentation
2024-06-18, 3347 (Amiga), Isafjordsgatan 22 (Kistagången 16), Stockholm, 11:00 (English)
Supervisors
Examiners
Available from: 2024-09-20 Created: 2024-08-08 Last updated: 2024-09-20Bibliographically approved

Open Access in DiVA

fulltext(577 kB)191 downloads
File information
File name FULLTEXT01.pdfFile size 577 kBChecksum SHA-512
679a97d6693be27c81f3e8e12b9e99cbdddee6ecf229b210358b2b7211761688f343bd41a9ad7eb0b509d247ee125718dc50ab7eb1f4a57adaf4a4b158e083eb
Type fulltextMimetype application/pdf

Search in DiVA

By author/editor
Hermansson, ViggoKanerva, Emil
By organisation
School of Electrical Engineering and Computer Science (EECS)
Computer SciencesComputer Engineering

Search outside of DiVA

GoogleGoogle Scholar
Total: 191 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

urn-nbn

Altmetric score

urn-nbn
Total: 202 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • 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