That approach is too brittle for my taste.  An annotator writer would
declare a type that is meant to be a singleton, but there's no way to
enforce this.  One careless annotator that creates a second instance of
such a type, and the whole analysis chain stops working.  With my approach,
at least the bar is a bit higher.


Well, with FsVariables, one careless annotator can still set the
variable to a new value and break downstream annotators.  There can
even be name conflicts with two annotators trying to use the same
variable name for different things.

It's OK with me to not implement my suggestion because it encourages
annotator developers to rely on undeclared assumptions (that only a
single instance of a type exists) - basically the same criticism I had
of the FsVariable proposal.  In that case let's leave things the way
they are.  I don't think this is a pressing problem that needs to be
addressed.

-Adam

Reply via email to