chenmoGnar's recent timeline updates
chenmoGnar

chenmoGnar

V2EX member #580142, joined on 2022-05-06 12:41:58 +08:00
chenmoGnar's recent replies
May 11, 2022
Replied to a topic by Aliberter 程序员 公正评价,这代码什么水平
@TWorldIsNButThis 是不是简单的逻辑要做到声明即初始化;因为我看 jdk 工具包里面都在方法的开始把后面用到的变量都声明了先,后面才初始化。平时我们自己写业务代码也不会单独起一行声明一个变量,也是跟初始化一起。
May 11, 2022
Replied to a topic by Aliberter 程序员 公正评价,这代码什么水平
@alexsunxl 这确实没必要,可以简化下
May 11, 2022
Replied to a topic by Aliberter 程序员 公正评价,这代码什么水平
把变量定义提前摆出来不是很好的习惯吗,楼主的改进版也仅仅是把定义和计算放在了一起而已;相反我觉得把变量类型声明成 boolean 看着更舒服
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1024 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 11ms · UTC 18:55 · PVG 02:55 · LAX 11:55 · JFK 14:55
♥ Do have faith in what you're doing.