Comments (5)
看不懂
from cgame.
回复地有点晚, 抱歉...
根据你的每一条建议来回复...
'用行数来判定代码精简' 多少还是有问题的, 这不可否认.
但如果是建立在一定规则下的话, 还是能够作为一个参考指标的吧, 多少还是能和代码量成正比, 如果你有尝试过格式化这些代码, 你会发现代码基本没有任何变化(vs2019没有变化, vscode多3行 与换行相关)
我也明白, up对代码精简的标准并不能受到多数人的认可, 即使如此, 也还是有很多人乐意去研究这些代码...
可读性这个问题, 第一次看这种代码肯定是看不懂的了, 但为了达到压缩极限, 这不可避免...当然可读性的标准都是主观上的, 那就假设和其他代码做个比较吧: 一个100行贪吃蛇一个14行贪吃蛇, 你会看哪个? 被这种极短代码震撼到了, 即使看不懂, 相信你也会愿意去研究这种代码吧,
何况还有视频动画讲解...
up对这种代码习以为常了...就算过去几个月, 别说阅读代码, 手撕代码都没问题...每个代码都重写过无数遍, 都让我印象深刻, 我认识的某个大佬, 研究我这些代码, 也能达到手撕代码的地步了(这大佬平时都很谦虚, 应该不会吹...)
后面都跟我的代码风格有关了, 都是小问题...
- 变量就几个, 能懂就行, 注释都写动画里了, 2.1k行注释(bushi)
- 就用一次calloc()也不至于这么夸张吧...直接定义数组的话, 下标不能为变量比较麻烦(宏定义不考虑, 那还得多一行), 或许你会说不定长数组, vs不支持这特性就没考虑了...而且不定长数组不能初始化, 需要遍历一次来赋值, 何必呢?
- 逗号运算符其实还好吧, 都遵循规范了, 换成
;
就不行了, 格式化会换行的 - ???
- ......
问题确实挺多的, 多说点也没关系的, 这并不是打击up, 是对up的肯定对吧? 不然也不会在这评论了...简短的代码也仅限于这些小游戏了, 正常的项目还是会正常写的...
from cgame.
from cgame.
@WalkerVictor 没回错啊...
如果你有关注这个项目(右上角的Watch), 大概都会收到邮件...刚刚看了一下, 你确实在列表里...
g++编译器不能通过编译的原因主要是类型转换, 因为c++对类型检查比较严格?
加进去被踢出来的原因是你入群问题答错了...重新加群回答就行
from cgame.
from cgame.
Related Issues (8)
- 滋磁
- 有bug
- GluttonousSnake/old_add_67lines.c
- 扫雷Linux版无法运行 HOT 1
- 好家伙
- 3_color_25lines.c的报错 HOT 4
- 萌新提问 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cgame.