[code-reflection] RFR: 8324789: Add line number information to code models [v2]
Maurizio Cimadamore
mcimadamore at openjdk.org
Thu Apr 25 10:38:38 UTC 2024
On Thu, 18 Apr 2024 15:25:59 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
> I was pondering aliasing `null`, such as `static final Location NOLOCATION = null`.
Ok. As long as the javadoc captures the intended semantics, I don't have a strong preference. Maybe a mild one for `Optional` given that (a) using nulls will cause NPEs (given this info truly is optional), and (b) having a "no location" singleton is equally odd (what's it's source/column number?). So, denoting absence as just absence seems (slightly) better from a modelling perspective.
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/54#discussion_r1579253173
More information about the babylon-dev
mailing list