|
|
The [named tuples](./Named-Tuples.md) are basically literal linked lists.
|
|
|
|
|
|
If you have a tuple like this:
|
|
|
|
|
|
```
|
|
|
(a,(b,(c)))
|
|
|
```
|
|
|
|
|
|
You can access the first element by just getting it.
|
|
|
You can access the first element by getting the second element and then the first element of that.
|
|
|
And so on.
|
|
|
|
|
|
It is probably not a coincidence that this is how the values of the named tuple are 3 long.
|
|
|
|
|
|
```c
|
|
|
SAC_ND_DECL__DATA( (SACp_pinl_271__emlr_220_i, (SCL, (NHD, (NUQ, (INT, (GLO, (NON, (NOT, (NDI, (INT, )))))))))), int, )
|
|
|
```
|
|
|
|
|
|
These named tuples were introduced to deal with the lack of macros with a variable number of arguments in C.
|
|
|
The idea is that you can just make a macro with a single input and just unwrap the named tuple until you get what you want.
|
|
|
|
|
|
The named tuples are build with the beautiful macros in `src/runtime/essentials_h/tuple.h`
|
|
|
There T_* macros are defined.
|
|
|
|