KarolS / KarolS/millfork

Support struct "inheritance" (extension)

Open
#22 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Scala
Stars
279
Forks
21
PR merge metrics
No merged PRs in 30d

Description

C11 supports struct extension, such that:

```
struct Foo {
byte foo1
}

struct Bar {
byte bar1
}

struct Foo_bar {
struct Foo
struct Bar
}
```
Produces the final struct:
```
struct Foo_bar {
byte foo1
byte bar1
}
```

While not a make or break feature, this allows some convenience in allowing composition without nesting, which is already represented by the memory structure.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.