# RecordType::Init dead code

**URL:** <https://community.zeek.org/t/recordtype-init-dead-code/2164>\
**Category:** Development\
**Tags:** development\
**Created:** [December 19, 2011, 5:43pm UTC](https://community.zeek.org/t/recordtype-init-dead-code/2164 "2011-12-19T17:43:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siwek\_Jon](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Siwek\_Jon](https://community.zeek.org/u/Siwek_Jon)\
**Post date:** [December 19, 2011, 5:43pm UTC](https://community.zeek.org/t/recordtype-init-dead-code/2164/1 "2011-12-19T17:43:20Z")

</div>

I was exploring the internals of records and noticed in RecordType::Init that there's an "assert(false)". Is this dead code that can be removed?

Removing it would also involve removing the RecordField class, the "fields" and "base" members of RecordType, the two-arg RecordType ctor, and the "refined\_type" rule from the parser (used in type and event declarations). What was the use for this "refined" record type?

I already experimented with removing all that stuff with all unit tests passing, want me to commit it so it can get merged?

+Jon

---

<div class="post-metadata">

**Author:** ![Vern](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/vern/32/630_2.png) [@Vern](https://community.zeek.org/u/Vern)\
**Post date:** [December 19, 2011, 6:51pm UTC](https://community.zeek.org/t/recordtype-init-dead-code/2164/2 "2011-12-19T18:51:43Z")

</div>

> What was the use for this "refined" record type?

IIRC, this was an experiment regarding of providing a form of inheritance.  
I don't remember how far it went; perhaps Robin does.

&nbsp;&nbsp;&nbsp;&nbsp;Vern

---

<div class="post-metadata">

**Author:** ![robin](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/robin/32/599_2.png) [@robin](https://community.zeek.org/u/robin)\
**Post date:** [December 19, 2011, 7:49pm UTC](https://community.zeek.org/t/recordtype-init-dead-code/2164/3 "2011-12-19T19:49:52Z")

</div>

No, I don't think I was involved with that. But I think we had  
actually already decided a while ago that this can be removed, we just  
never followed up with doing it. So, Jon, yes, please move ahead.

Robin

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:40pm UTC](https://community.zeek.org/t/recordtype-init-dead-code/2164/4 "2022-05-06T15:40:05Z")

</div>


