-
Notifications
You must be signed in to change notification settings - Fork 9
Description
When first developing this package, I assumed users would always use parse_network
to create a Network
and associated Records
. The Records
are public API, and users are expected to access their fields (also public API).
But I never thought users would want to manually construct Records
, passing in their own data like Buses30([1, 2], ["A", "B"], ...)
etc.
The problem is that as we learn more about this wacky data format we get new requests, like #27, some of which are best solved by adding new fields to the Records
types. And if the constructors for Records
types are public API then adding new fields is breaking... and to make it non-breaking we have to add long methods like Buses30(arg1, arg2, ..., argN) = Buses30(arg1, arg2, ..., argN, new_field_default_value)
which is burdensome for maintainence.
We've slowly been adding more user-friendly constructors, like #73, so we might want to decide and document what constructors are public API e.g. defining all keyword constructors and say these are the only public constructors. To do that we'd need to remove the existing no-arg constructor e.g. replace
Line 2846 in 9f2532c
@eval $R(sizehint::Integer=0) = $R(map(T -> sizehint!(T(), sizehint), fieldtypes($R))...)::$R |
with
$R(sizehint::Integer)