Because the code isn't guaranteed to work. We have no guarantee that a
static block will execute after any non-static code, such as for example
the code that would initialize GlobalSettings.nonSymbolicTags. If you want
to argue that the access to kompile settings isn't needed here, okay, I can
get rid of it. But static code can't access data that was initialized by
instance fields. It's part of the Java standard.


On Mon, Mar 31, 2014 at 2:23 PM, Traian Florin Șerbănuță <
notifications@github.com> wrote:

> In
> src/javasources/KTool/src/org/kframework/backend/symbolic/TagUserRules.java:
>
> > @@ -28,25 +26,19 @@
> >   */
> >  public class TagUserRules extends CopyOnWriteTransformer {
> >
> > -    public static final Set<String> notSymbolicTags;
>
> I'm trying to understand why a static object is bad in this instance, as
> notSymbolicTags is practically a constant. One benefit I can see is that it
> is initialized only once and it can be accessed by other classes.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/kframework/k/pull/309/files#r11132091>
> .
>