How can you import a struct into a unit? I’m getting this error message when I try to call struct-copy
on a struct imported via a signature: struct-copy: not all accessors are statically known for structure type in: graph
.
@bkovitz is there a reason you’re using units? I wouldn’t recommend them
I’m trying to make it easy to swap different parts of this thing in and out—and to make the source code overall more manageable by breaking it up.
Is there something better that I should be using? Or do units have problems that might mean I’ll be better off living with the sprawl that I have now?
I think multiple modules, and parametrizing things with functions, are what I’d recommend
Thanks. I’ll give up on the units and try splitting up the code into more modules, and maybe a macro or something to “link” functions together.
Units seem like a great idea. I tried to implement something like them in both Scala and Clojure, so I could toss modules together easily and run experiments that compare different alternative modules. I never got it to work satisfactorily, though.