You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cassandra.apache.org by "benedict@apache.org" <be...@apache.org> on 2022/05/13 12:50:32 UTC

Re: Updating our Code Contribution/Style Guide

It’s been a couple of months since I opened this discussion. I think I have integrated the feedback into the google doc. Are there any elements anyone wants to continue discussing, or things I have not fully addressed? I’ll take an absence of response as lazy consensus to commit the changes to the wiki.



From: benedict@apache.org <be...@apache.org>
Date: Monday, 14 March 2022 at 09:41
To: dev@cassandra.apache.org <de...@cassandra.apache.org>
Subject: Updating our Code Contribution/Style Guide
Our style guide hasn’t been updated in about a decade, and I think it is overdue some improvements that address some shortcomings as well as modern facilities such as streams and lambdas.

Most of this was put together for an effort Dinesh started a few years ago, but has languished since, in part because the project has always seemed to have other priorities. I figure there’s never a good time to raise a contended topic, so here is my suggested update to contributor guidelines:

https://docs.google.com/document/d/1sjw0crb0clQin2tMgZLt_ob4hYfLJYaU4lRX722htTo

Many of these suggestions codify norms already widely employed, sometimes in spite of the style guide, but some likely remain contentious. Some potentially contentious things to draw your attention to:


  *   Deemphasis of getX() nomenclature, in favour of richer set of prefixes and more succinct simple x() to retrieve where clear
  *   Avoid implementing methods, incl. equals(), hashCode() and toString(), unless actually used
  *   Modified new-line rules for multi-line function calls
  *   External dependency rules (require DISCUSS thread before introducing)