Skip to content

Latest commit

 

History

History
123 lines (84 loc) · 2.07 KB

OOP-overview.asciidoc

File metadata and controls

123 lines (84 loc) · 2.07 KB

OOP Overview

Table 1. How different kinds of objects may be represented
Combinations

Property

1

2

3

4

5

6

7

8

9

10

11

12

State

None

Immutable

Mutable

Polymorphism

None

Closed

Open

Sharing

Single referrer

Multiple referrers

Shared between threads

Representable by…​

1

2

3

4

5

6

7

8

9

10

11

12

Term

Function object

VTable

(VTable,State) pair

ETS table

Process

Table 2. Comments
Nr. Comment

1

Has neither value nor behaviour. There are two cases:

  • A unique reference, if object identity is used.

  • A dummy constant, otherwise.

2

Atom naming the type

3

Behaviour without state

4

Classic monomorphic value object

5

Records

6

Behaviour with fixed state

7

Threaded value

8

Threaded value with vtable

9

Mutable objects kept in an ETS table

10

Mutable (VTable,State) pairs kept in an ETS table

11

Non-private ETS table, or state kept by a process

12

Non-private ETS table, or state kept by a process