bachelor's thesis
Konstantin Bojchevski (Author), Luka Fürst (Mentor)

Abstract

Generics are a powerful tool in object-oriented programming languages, especially in the Java programming language. They play an important role in software development, since they enable the programmer to write typeindependent code in a type-safe way. In a nutshell, a generic Java class (or method) is a class (or method) parameterized with an arbitrary number of types. When using a generic class or method, we specify concrete values for the type parameters, effectively tailoring the code of the class or method for concrete types. Another benefit of Java generics is that type safety is enforced during compilation rather than execution. The C++ programming language has a concept parallel to Java generics; these are templates. C++ templates and Java generics are similar to one another in terms of code syntax, the provided support for parameterizing types, and the most frequent use cases. However, they are actually implemented in a significantly different way, and there are important differences in their use and background semantics. In this thesis, we will show examples for both Java generics and C++ templates. We will discuss their similarities and differences, as well as advantages and disadvantages.

Keywords

Java programming language;generics;templates;computer science;diploma thesis;

Data

Language: English
Year of publishing:
Typology: 2.11 - Undergraduate Thesis
Organization: UL FRI - Faculty of Computer and Information Science
Publisher: [K. Bojchevski]
UDC: 004.43(043.2)
COBISS: 143000579 Link will open in a new window
Views: 44
Downloads: 20
Average score: 0 (0 votes)
Metadata: JSON JSON-RDF JSON-LD TURTLE N-TRIPLES XML RDFA MICRODATA DC-XML DC-RDF RDF

Other data

Secondary language: Slovenian
Secondary title: Generiki v jeziku java in vzporednice s predlogami v jeziku C++
Secondary abstract: Generiki so močno orodje v objektno usmerjenih programskih jezikih, še zlasti v jeziku java. Pri razvoju programske opreme igrajo pomembno vlogo, saj omogočajo programerju, da piše kodo, ki je neodvisna od konkretnih tipov, a kljub temu jamči pravilno rabo tipov. Generični javanski razred (oz. metoda) je v osnovi razred (oz. metoda), ki je parametriziran(a) s poljubnim številom tipov. Pri uporabi generičnega razreda oz. metode podamo konkretne vrednosti za tipne parametre in tako prilagodimo kodo razreda oz. metode za konkretne tipe. Druga prednost javanskih generikov je, da se skladnost tipov preverja že v času prevajanja, ne šele v času izvajanja. Koncept, podoben generikom v javi, obstaja tudi v jeziku C++: to so t.i. predloge. Predloge v C++ in generiki v javi so si med seboj podobni po sintaksi, po podpori parametrizaciji tipov in po najpogostejših primerih uporabe, močno pa se razlikujejo po implementaciji. Bistvene razlike lahko najdemo tudi pri uporabi in semantiki generikov in predlog. V tej diplomski nalogi se bomo ukvarjali tako z generiki v javi kot s predlogami v C++. Govorili bomo o njihovih medsebojnih podobnostih in razlikah, pa tudi o prednostih in slabostih.
Secondary keywords: generiki;C++;predloge;univerzitetni študij;diplomske naloge;Java (programski jezik);Generično programiranje (računalništvo);Računalništvo;Univerzitetna in visokošolska dela;
Type (COBISS): Bachelor thesis/paper
Study programme: 1000468
Embargo end date (OpenAIRE): 1970-01-01
Thesis comment: Univ. v Ljubljani, Fak. za računalništvo in informatiko
Pages: 62 str.
ID: 17916553
Recommended works:
, spletne storitve za izvajanje prostorskih analiz