TLDR; Ignore this mail unless you are interested about linguistic ;-)


As I wrote, I have no strong opinion about 80 vs 120, but I couldn't resist to move this conversation towards grammar and linguistic.

Anu, you referenced typography guidelines (such as [1]) which talk about the ideal line length (~66).

But I am not sure how does it apply to Java code. I think information depends from morphemes[2] not characters. Therefore information density depends on morpheme density.

Structure of languages can be different. For example German (and Estonian, probably because the impact of German in the middle ages) prefer to use compound words.

German is is especially famous about this. Google for the longest German word, such as Donaudampfschiffahrtselektrizitätenhauptbetriebswerkbauunterbeamtengesellschaft [3]

And I am really interested what is the ideal line length for Mandarin (I would expect less "characters")


But how can we use our experiences with real languages for code? The example of compound words shows that we should think about morphemes and not in words. But what is a morpheme in Java code?

For example in this code:

ozoneManager.getHttpPort()


We can say that this is 2 morpheme (object + method name) but the "get" itself shows that it's nothing more just a getter. Http and Port also can be separated morphemes but ozoneManager seems to be one. How many information particles can be found here?

At the end of the day we should limit the morphemes (information) not the characters (IMHO).


What is the conclusion, here?

I have no idea, how does it work, but I don't think that typography suggestions of real languages can be applied 1:1.


For me, it's easy an conclusion: just tell me a hard limit and I will follow it. Either it's 80 or 120.

Marton



[1]: https://accessibility.digital.gov/visual-design/typography/

[2]: https://en.wikipedia.org/wiki/Morpheme

[3]: https://en.wikipedia.org/wiki/Donaudampfschiffahrtselektrizit%C3%A4tenhauptbetriebswerkbauunterbeamtengesellschaft

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-dev-h...@hadoop.apache.org

Reply via email to