Replies: 2 comments
-
Hey! PGPainless' code style is heavily influenced from the style that the Smack Project is using. Smack in turn is making use of Suns Java Code Conventions. I know that there are some longer lines caused by Java-typical horribly long class names unfortunately, but I personally dislike it when a statement gets dragged out over too many lines, hence I tend to not follow the character limit rule too strictly. In my opinion we should make use of wide screen monitors, but I can also see a point for why shorter lines are desirable. In conclusion: PGPainless tries to follow most of the Sun Code Conventions but does not strictly enforce line character limits if those would result in 3+ line statements. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the explanation! I've seen the Sun document but I'll have a more careful look. |
Beta Was this translation helpful? Give feedback.
-
I'm new to Java. (Many years of C/C++ though). I've noticed that there are dramatically different Java coding styles in use and would appreciate help on this. I realize this a bit off-topic but hope you will humour me!
Does PGPainless follow a standard coding style and if so, where can I find the standard defined? How closely does PGPainless keep to the standard?
I've looked at some of the BouncyCastle source. It uses a lot of vertical space on the screen. For example it has many lines which contain a single { or }. That means I see less of the program on my screen which, to my mind, makes it harder for me to read the code. PGPainless code mostly does not do this. But, PGPainless has many very long lines. I'm used to manually wrapping lines at 72 or 80 characters which uses more vertical space but makes it easier to compare two files side by side.
Any comments would be appreciated! Thank you to the developers for making it easier to do crypto in pure Java.
Beta Was this translation helpful? Give feedback.
All reactions