Open pospi opened 5 years ago
I want to bring @zippy in on this discussion. What are some of the reasons for strictly enforcing base and target types for a given entry type?
The first thing that springs to mind is that without this there are extra responsibilities for the DNA developer to make sure that links can't be added to break certain data structures or load up certain bases with links.
I wonder if we could lessen the validation done by the subconscious and make the link creation macros able to do this in WASM but only if required?
I guess I see what you're saying, but still feel like this is overly restrictive. If people accidentally use the same link_type
in multiple entry defs, shouldn't that be pretty easy for them to debug? Those link type names are emitted by the console on both read & write ops.
See commit referenced above to get a sense of the additional verbosity and plumbing needed to deal with this change.
Since updating from
0.0.18
to0.0.27
I am getting errors like this one:It would be nice to restore an ability to mix and match more arbitrarily, as losing this effectively prevents polymorphism and clean abstractions for record data structures. I now have to:
commitment_initial_entry
andintent_initial_entry
instead ofrecord_initial_entry
)create_record
helper such that everycreate_record
call needs to provide an underlying link name; or simply remove the link entirely, which was only present for semantic hinting in external tooling like zome explorer interfaces anyway.Neither of these feel like great outcomes- losing some flexibility and potentially causing developers to shy away from creating easily explorable data structures. Or is "Address as content" a reasonable design pattern which implies an ability to crawl from one data object to another?