Back to search

Texas A&M University

Generic programming in Scala

Abstract

dc:description.abstract

Generic programming is a programming methodology that aims at producing reusable code, defined independently of the data types on which it is operating. To achieve this goal, that particular code must rely on a set of requirements known as concepts. The code is only functional for the set of data types that fulfill the conditions established by its concepts. Generic programming can facilitate code reuse and reduce testing. Generic programming has been embraced mostly in the C++ community; major parts of the C++ standard library have been developed following the paradigm. This thesis is based on a study (by Garcia et al.) on generic programming applied to other languages (C#, Eiffel, Haskell, Java and ML). That study demonstrated that those languages are lacking in their support for generic programming, causing diffculties to the programmer. In this context, we investigate the new object-oriented language Scala. This particular language appealed to our interest because it implements "member types" which we conjecture to fix some of the problems of the languages surveyed in the original study. Our research shows that Scala's member types are an expressive language feature and solve some but not all of the problems identified in the original study (by Garcia et al.). Scala's members types did not resolve the problem of adding associated types to the parameter list of generic methods. This issue led to repeated constraints, implicit instantiation failure and code verbosity increase. However, Scala's member types enabled constraint propagation and type aliasing, two significantly useful generic programming mechanisms.

Degree

thesis:*
Name thesis:degree_name
Master of Science
Level thesis:degree_level
Masters
Discipline thesis:degree_discipline
Computer Science
Department thesis:degree_department
Computer Science
Grantor dc:publisher
Texas A&M University
Year dc:date.issued
2007

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • N'guessan, Olayinka
Advisor dc:contributor.advisor
  • Jarvi, Jaakko
Committee members dc:contributor.committeemember
  • Allen, Roland
  • Stroustrup, Bjarne

Subjects

dc:subject × 2

Rights

Language dc:language.iso
en_US

Identifiers

dc:identifier.*
Handle dc:identifier.uri
https://hdl.handle.net/1969.1/5008

Chain of custody

source
Harvested from
Texas A&M University
Base URL
oaktrust.library.tamu.edu/server/oai/request
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
related terms
citation

N'guessan, Olayinka. Generic programming in Scala. Masters thesis, Texas A&M University, 2007. https://hdl.handle.net/1969.1/5008