we could make it a class like `BuildFileAliases` a...
# development
a
we could make it a class like
BuildFileAliases
and override the
+
or
|
operator!!!!
h
We could. It would be cool code. But, I think a big benefit of the engine is how much of it is plain and simple Python 3
UnionRule()
isn’t enough of a pain to justify a custom dict type, imo
h
I'd rather keep the data structures standard python dicts and lists (or sets), and just write a simple utility function to do the meging
a
wrapping things in classes makes it easier for me to reason, idk if you've noticed. definitely a personal thing
h
yeah that's the classic object-oriented vs functional trade-off
a
ehhh i don't know about that
h
you can write a class that encapsulates some specific business logic, or write a function that knows how to implement that business logic on less complicated types
a
@dataclass
is a great example of leaning towards less stateful programming
oh
well
when i hear "object-oriented vs functional" my hackles raise up for no reason
that's a good point!
h
yeah people can definitely get ideological about those terms. I like to think about them as value-neutral descriptors of ways of thinking about code organization
a
i just don't know how to interpret anyone's usage of them :D
💯 1