Github user ajs6f commented on the pull request:
https://github.com/apache/jena/pull/110#issuecomment-167593138
1. I totally understand that changing `Triple` and `Quad` is significant,
so that caution is the order of the day.
2. I'm not sure of what you mean by the "compiler implications". I think
that what's in this PR is just as typesafe as what is in `master` now without
any more overhead, but I'm happy to correct any examples that pop up. We could
get rid of the extra slots by offering a fixed-size tuple constructor
`Tuple(byte size, T... elements)`, which might be nice anyway.
3. I don't understand how the notions of equality are different here, but I
haven't thought as much about triples as have you. Only two `Triple`s with the
same subject, predicate and object are equal now, and only two such triples are
equal in this PR. (More or less the same for `Quad`s.) I've added a commit to
show that. Am I missing something about how two `Triple`s could be `equal` when
they aren't equal as `Tuple`s? I was careful to fix subject, predicate and
object to _specific_ components of the `Tuple` (`0`, `1`, and `2`). I don't
think this PR can generate problems with triples with different orders of
components.
4. I actually find `nodes[1]`, etc. much clearer than `first`, etc.,
because the numbers help me understand what is going one, but I think that's a
matter of personalities, so it's no argument in favor of the PR.
Basically, since `ColumnMap` is designed to work with `Tuple`s only, I did
this in order to use it without incurring lots of extra object creation. If we
don't go that road, cool, I'll look at creating something like `ColumnMap` but
targeted at `Triple` and `Quad`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---