Feature request: `#include` statements for DSL
I'm steadily building a library of functions written in the miller DSL. It would be useful to be able to source them into my scripts with a c-style #include statement.
@vapniks thanks for the request. I've never been eager to go this route -- C's include pattern has been (IMO) an antipattern over the years; being moved away from in other languages since, such as Java and Go; and C++ itself is moving (albeit slowly) along the module route and away from includes.
At a more concrete level, there are potential user-level confusions such as having a #include line inside curly braces, difficulty debugging when the include is in the wrong place, difficulty debugging when the include is in the intended place but the code isn't functioning as desired. Also implementation-level snags such the possibility of infinite recursion.
I've instead leaned toward library-loading: here for example: https://miller.readthedocs.io/en/latest/reference-dsl-user-defined-functions/#loading-a-library-of-functions
If you haven't checked that out, please do! If you already have and it isn't working well for you, my preference would be to have a conversation about how to make it better fit your needs.
Yeah, I saw that, but it means I (and anyone I share my code with) have to remember to type it on the command line every time :(