mo-fu note

研究からキックボクシングまで何でも書いていきます!

Oxford commaについて

github.com

api_documentation_guidelines に Commaについての説明が追加された。 Oxford commaは並列関係の単語を並べる時に、 最後のandの前にカンマを付けるスタイルのことを指す。

https://github.com/rails/rails/pull/21334#issuecomment-133776327

のコメントが絵付きでイメージしやすかった。 I had eggs, orange juice, and toast. のように and の前にカンマを付けるのがOxford comma。 I had eggs, orange juice and toast. でも間違いはない。

論文などによって推奨されるスタイルは違うと思うけど、 Oxford commaは並列関係を明確化できるのが良いみたいです。