Skip to content

Commit ee96a7c

Browse files
committed
fixup! Add EEP for native records
1 parent 95f78bf commit ee96a7c

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

eeps/eep-0079.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,24 @@ create a record with one million elements.
169169
170170
As it can be seen from the next sections, working with native records outside of
171171
the defining module needs using fully qualified names of the native records:
172-
`#misc:user{}`, ... This quickly may become too cumbersome and verbose. The
173-
`-import_record` directive works similar to the `-import` and `-import_type` directives.
172+
`#misc:user{}`, ... This quickly may become too cumbersome and
173+
#verbose. The
174+
`-import_record` directive works similar to the `-import` and `-import_type`
175+
directives.
176+
174177
Imported native records can be used by their short names.
175178
176179
```erlang
177180
-module(example2).
178181
-import_record(example1, [user, pair]).
179182
```
180183
184+
An `-import_record()` directive can be placed anywhere in the module
185+
(but obviously after `-module()` attribute). That makes it possible to
186+
replace an include of an header file with record definitions with an
187+
`-import_record()` directive without having to move it up to near the
188+
top.
189+
181190
### Definitions
182191
183192
From now on let’s employ more precise terminology (when needed).

0 commit comments

Comments
 (0)