alibaba / alibaba/Alibaba-Java-Coding-Guidelines
Question for using wrapper class at POJO
- 主要言語
- 言語のデータがありません
- スター
- 1.1k
- フォーク
- 246
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Sorry, I don't know where is a suitable place to discuss the question, so I just open an issue here to ask my question.
I have a question about the 8th point of [OOP rules](https://github.com/alibaba/Alibaba-Java-Coding-Guidelines#oop-rules).
> 8. [Mandatory] Rules for using primitive data types and wrapper classes:
1) Members of a POJO class must be wrapper classes.
2) The return value and arguments of a RPC method must be wrapper classes.
3) [Recommended] Local variables should be primitive data types.
Based on this rule, it will only allow us to use the primitive type in local variables. Then, we need to use wrapper classes in all other places.
The thing is that most of the suggestions I saw at the Internet is we should avoid wrapper classes as much as possible.
The reasons are
- performance
- memory footprint
So could anybody explain the reason behind this rule? Thanks. 🙏
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
リンクされたOOPルール、特にルール8と、primitive型およびwrapper型に関するそのガイダンスから始めてください。有用な成果としては、maintainerが承認したルールの説明または明確化が考えられますが、issueでは更新対象のドキュメントファイルやテストは指定されていません。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 20/100