Omr: Proposal to shorten Tril commoned node identifiers

Created on 15 Aug 2017  路  3Comments  路  Source: eclipse/omr

In an attempt to make Tril slightly less verbose when dealing with commoned nodes, instead of declaring @common id="foo" can we simply shorten it to @id="foo" ?

To my eye, it is still easy to distinguish commoned and uncommoned node identifiers. It also looks more readable when there are a lot of commoned nodes in play (though, arguably, Tril isn't really supposed to favour human readability).

Any thoughts?

@Leonardo2718

tril discussion

Most helpful comment

Can you emit a deprecation warning if you use @common? Just, if you support both without... soon both will be there forever...

All 3 comments

I'm okay with the shorter syntax, though I would prefer @id "foo" (without the =) as this avoids having to changing the parser :sweat_smile: .

Any objections to supporting both forms (at least until Tril gets proper versioning)?

Can you emit a deprecation warning if you use @common? Just, if you support both without... soon both will be there forever...

No objections to supporting two syntaxes provided there is justification.

As we discussed in person, I'm OK with the alternate @id syntax and the reasoning for it (the reasoning being that an id cannot appear as the first term in an s-expression in the current grammar). I'm willing to trade off the slight inconsistency with id usage for the decrease in verbosity.

Was this page helpful?
0 / 5 - 0 ratings