cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedict (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-10063) Standardize use of collections, streams, iterables, functions, predicates etc.
Date Thu, 13 Aug 2015 09:45:46 GMT
Benedict created CASSANDRA-10063:

             Summary: Standardize use of collections, streams, iterables, functions, predicates
                 Key: CASSANDRA-10063
             Project: Cassandra
          Issue Type: Improvement
          Components: Core
            Reporter: Benedict
            Assignee: Benedict
             Fix For: 3.x

With the advent of Java 8 we have a lot of different mechanisms for achieving the same expression
of ideas. We should standardize on (approximately) a single approach across the codebase,
as this will help clarity, reduce development time (with less indecision about which set of
tools to use, and how to interface between the two), and improve icache occupancy.

The problem is exacerbated by the difficulty of interfacing between the two paradigms, and
this (IMO) introduces an unnecessary cognitive burden when they inevitably meet. We should
pick one and fill in whatever we're missing to make it fit all of our needs. We should perform
a bit of due diligence about the implementation details of any utility methods we use also,
as having dived into a handful they are occasionally.... surprising. And probably not how
we would implement them (take {{Ordering.leastOf}} as an example).

Since it is the future, I think we should be standardising on the JDK8 Streams API where possible.
There are a couple of rough edges with interfacing with it in some places, but we can smooth
them and the result should be much more legible code.

This really should not be a huge amount of work, and I expect will pay dividends quite quickly.

This message was sent by Atlassian JIRA

View raw message