jbee/purejin

How to declare the order in which Initialisers are applied?

Closed this issue · 1 comments

jbee commented

Currently Initialisers are applied in a pseudo-random order. It is simply the order the end up in the list of Resources which depends on how qualified they are. Assuming all are equally qualified the order is simply the order in which the declaration binding was encountered during bootstrapping. While this is a (mostly) deterministic order it is not useful in any way for the user.

Ideally users could give an additional priority for Initialiser of the same qualification level. This is most likely best solved by adding a general feature that allows adding a priority to bindings. Note that this only makes sense and is needed for declarations of type MULTI as other types would mean that equally qualified bindings for the same instance clash.

jbee commented

Implemented by #110