Instantiation of Java generics
Type parametrization is an essential construct in modern programming languages. On one hand, Java offers generics, on the other hand, C++ offers templates for highly reusable code. The mechanism between these constructs differs and affects usage and runtime performance, as well. Java uses type erasu...
Elmentve itt :
| Szerzők: | |
|---|---|
| Dokumentumtípus: | Cikk |
| Megjelent: |
University of Szeged, Institute of Informatics
Szeged
2022
|
| Sorozat: | Acta cybernetica
25 No. 4 |
| Kulcsszavak: | Programozás - generikus, Programozási nyelv - C++, Java - programnyelv |
| Tárgyszavak: | |
| doi: | 10.14232/actacyb.284073 |
| Online Access: | http://acta.bibl.u-szeged.hu/86959 |
| Tartalmi kivonat: | Type parametrization is an essential construct in modern programming languages. On one hand, Java offers generics, on the other hand, C++ offers templates for highly reusable code. The mechanism between these constructs differs and affects usage and runtime performance, as well. Java uses type erasure, C++ deals with instantiations. In this paper, we argue for an approach in Java which is similar to C++ template construct. We evaluate the runtime performance of instantiated code and we present our tool which is able to use Java generics as templates. This tool generates Java source code. We present how this approach improves the usage of Java generics. |
|---|---|
| Terjedelem/Fizikai jellemzők: | 897-908 |
| ISSN: | 2676-993X |