Rust code is really unreadable for beginners who want to add new functionality.
Is your feature request related to a problem? Please describe.
I was trying to add a new feature into rust but then the code seems very poor in commenting what it does except few lines.
Describe the solution you'd like
Proper documenting and Commenting required to promote more growth in the Script.
Additional context
@lj3954 @adamperkowski I think you two could best implement detailed comments in the rust codebase.
There's 1843 total lines written in Rust in Linutil as of 006326afa9a6f98f00d1672280e38ceecb139847. 1605 in tui and 238 in core. A lot to comment.
/unlabel 'enhancement' /label 'rust'
There's 1843 total lines written in Rust in Linutil as of 006326afa9a6f98f00d1672280e38ceecb139847. 1605 in
tuiand 238 incore. A lot to comment.
Not to mention that those lines are extremely volatile. It's understandable that someone would want an easy experience with contributing, but there are times when the only way to really understand the code is to actually read the code.
Comments get old, people get lazy, and all of a sudden the once helpful comments are just bloat.
Just speaking from my own experience, this codebase is actually pretty good. There's a lot of meaningful semantic variable naming, there's not a whole lot of macros, and the code itself follows a pretty linear path. I've actually had a very pleasant experience contributing to this project for these reasons.
If you're interested there's a pretty great video by CodeAesthetic that pretty much sums up my own opinion about commenting.
Also, I'm not saying that the internal interfaces shouldn't be documented, but I'm not sure that's what your point is, @guruswarupa
This is actually one of the few open source codebases where I don't get lost. You can easily follow the flow and get to wherever you want to.
I do understand about newcomers tho, and maybe the more stable parts of the tool could be better documented. I can work on that if we agree that it should be worked on.
/close not planned
Adding comments will clutter the codebase and updating those comments will be a hassle, especially with the rate Linutil has been going, things change, things change fast and we can't constantly be managing and updating comments in the src.