-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintrospection.tex
46 lines (36 loc) · 2.02 KB
/
introspection.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
\documentclass[12pt]{article}
\usepackage{graphics}
\usepackage[pdftex,%
bookmarks=true,%
colorlinks=false,%
pdftitle={Introspective C++},%
pdfauthor={Hermanpreet Singh},%
linkbordercolor={.01 .01 .01},%
anchorcolor={0 0 0},%
citebordercolor={0 0 0},%
pdfborder={0 0 0 [3]}]{hyperref}
\usepackage[sort]{cite}
\usepackage{url}
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{8.5in}
\setlength{\evensidemargin}{0in}
\setlength{\oddsidemargin}{0in}
\setlength{\topmargin}{0in}
\setlength{\parindent}{0pt}
\setlength{\parskip}{0.1in}
\begin{document}
\title{Introspection in Programming Languages}
\author{Lally Singh\footnote{\texttt{[email protected]}}}
\maketitle
Introspection is a major capability missing from C++. With it, software components have the ability to simultaneously interact more intimately and more generically.
For example, the JavaBeans [35] architecture uses a combination of introspection and naming conventions to enable the automatic lookup, discovery, instantiation, and initialization of Java classes from a data definition thatÕs only available at class time. One common use is for an application to read in a row of a table in a database and call setY on an entity class (called a Bean in Java terminology) for every column Y in the row. The applicationÕs code can use metadata from the database to get all the columns available, and introspect the bean to find and call the appropriate initialization method.
Java, Smalltalk, and ObjectiveÐC provide introspection via runtime data structures. Such data structures are generated for each class, method, and member. For large systems, the storage overhead can become significant. Also, the introspection requires runtime access to work; adding overhead to the systemÕs runtime.
OpenC++\cite{chiba} provides a mechanism for compiler plug--ins to extend the language itself.
\input{smalltalk}
\input{objc}
\input{java}
\input{opencpp}
\bibliographystyle{plain}
\newpage
\bibliography{References}
\end{document}