Skip to content

Commit 4cfaaf6

Browse files
WIP how it works
1 parent a789aa0 commit 4cfaaf6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/how_it_works.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11

2-
The basic idea:
2+
# How Archetype Works:
3+
4+
This document is meant to clearly show the principles on which archetype works without you having to decipher the macro heavy archetype.h file. The intention is to show how the principles have been combined, and provide a rationale for why I have implemented archetype this way.
5+
6+
Underneath the hood Archetype uses manual vtables to acheive type erasure and run time polymorphism. This is not dissimilar from how virtual functions in traditional inheritance work. Vtables and surrounding infrastructure require a lot of boiler plate. The point of Archetype is to automate manual vtable generation, in a modular/composable way.
7+
38

49
```cpp
510
struct writable

0 commit comments

Comments
 (0)