Intermediate Representation docs (#6685)

* Intermediate Representation docs

* minor rewording

* addressing comments

* move IR to bottom

Co-authored-by: Casper Neo <cneo@google.com>
This commit is contained in:
Casper
2021-06-17 11:46:34 -04:00
committed by GitHub
parent 4e3a66c141
commit 2cf7bb7966
4 changed files with 40 additions and 1 deletions

View File

@@ -637,10 +637,14 @@ optional type.
Some `FlatBufferBuilder` implementations have an option called `force_defaults`
that circumvents this "not writing defaults" behavior you can then use
`IsFieldPresent` to query presence.
/
Another option that works in all languages is to wrap a scalar field in a
struct. This way it will return null if it is not present. This will be slightly
less ergonomic but structs don't take up any more space than the scalar they
represent.
[Interface Definition Language]: https://en.wikipedia.org/wiki/Interface_description_language
## Writing your own code generator.
See [our intermediate representation](@ref intermediate_representation).