tuxji commented on PR #947: URL: https://github.com/apache/daffodil/pull/947#issuecomment-1416558558
> I disagree about rewrite.trailingCommas.style. Well, I agree with the current Scala [guide](https://docs.scala-lang.org/style/declarations.html) where it advises using trailing commas in declarations. [SIP-27 Trailing Commas](https://docs.scala-lang.org/sips/trailing-commas.html) shipped in Scala 2.12.2, so it may have been a more recent Scala change than when Steve and you wrote most of Daffodil. I think the reasons cited in that SIP are pretty compelling, don't you? JavaScript also [allows](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Trailing_commas) trailing commands in array literals, object literals, parameter definitions, function calls, named imports, named exports, and array and object destructuring. In all these cases, the trailing comma is entirely optional and doesn't change the program's semantics in any way. The trailing comma is particular useful when adding, removing, or reordering items in a list that spans multiple lines, because it reduces the number of lines that need to be changed, which helps with both editing and reviewing the diff. C# also [allows](https://www.jetbrains.com/help/rider/Trailing_Commas_Style.html) you to have the trailing comma after the last item. I also found another place in the standard Scala documentation recommending using trailing commas after [compiler options](https://docs.scala-lang.org/overviews/compiler-options/#use-compiler-options-with-sbt) in build.sbt. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
