DEV Community

Discussion on: Compiling Algebraic Data Types in Pure C99

Collapse
 
gabrielfallen profile image
Alexander Chichigin

A sick (in a good sense! 😃) library and a nice post!

Though I have one clarifying question.

A value constructor is an inline static function

If it's static and defined in a .c file it won't be visible outside this file. But putting the whole (generated) function in a .h file is less than ideal. What way out of this would you suggest?

Collapse
 
hirrolot profile image
Hirrolot • Edited

I would suggest to use precompiled headers to make all these functions compiled only once. This would also increase compilation times of datatype(...).

Collapse
 
gabrielfallen profile image
Alexander Chichigin

You probably mean decrease compilation times? 😄

Thread Thread
 
hirrolot profile image
Hirrolot

Ah yeah, that's a typo :)