Linguistic Reflection

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/11

flashcard set

Earn XP

Description and Tags

Learn about linguistic reflection!

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

12 Terms

1
New cards

linguistic reflection

the ability of a running program to generate new program fragments and to integrate these into its own execution

2
New cards

reflection

provide language structures that provide run time access to other language structures

3
New cards

common example of reflection

classes - instances of classes are objects, which can make classes themselves

4
New cards

different way to call a method 1

statically - obtain a reference and make the call in the code

5
New cards

different way to call a method 2

dynamically - obtain a meta object for the method and construct a call using that

6
New cards

dynamic loading

load a class whose type we didn’t know

7
New cards

benefit of linguistic reflection 1

system evolution - load new objects without recompiling and extend functionality of a running system

8
New cards

benefit of linguistic reflection 2

build a gui that shows the code, allow interactive method calls from an interface

9
New cards

drawbacks for linguistic reflection 1

code becomes more verbose, you have to deal with things that are usually handled by the compiler

10
New cards

drawbacks for linguistic reflection 2

late error detection

11
New cards

drawbacks for linguistic reflection 3

performance can be reduced

12
New cards

tradeoffs for reflection for components

generic, can call any method on any object we have a reference to, regardless of if its available at compile time