본문 바로가기
  • Home

Feasibility Study Of Functional Programming In Scala Language By Implementing An Interpreter

  • Journal of The Korea Society of Computer and Information
  • Abbr : JKSCI
  • 2023, 28(2), pp.111-119
  • DOI : 10.9708/jksci.2023.28.02.111
  • Publisher : The Korean Society Of Computer And Information
  • Research Area : Engineering > Computer Science
  • Received : January 30, 2023
  • Accepted : February 20, 2023
  • Published : February 28, 2023

Sugwoo Byun 1

1경성대학교

Accredited

ABSTRACT

In this paper, we investigate the feasibility of functional programming in the Scala language. The main issue is to what extent Scala is able to handle major properties of functional programming such as lambda expression, high-order functions, generic types, algebraic data types, and monads. For this purpose, we implement an interpreter of an imperative language. In this implementation, the same functional programming techniques are applied to both Haskell and Scala languages, and then these two versions of implementations are compared and analyzed. The abstract syntax tree of an imperative language is expressed as algebraic data types with generics and enum classes in Scala, and the state transition of imperative languages is implemented by using state monad. Extension and given, new features of Scala, are used as well.

Citation status

* References for papers published after 2023 are currently being built.