Skip to content

Adding comments in code vs writing self-explanatory functions, variables, etc. #1230

Discussion options

You must be logged in to vote

A few days into hypermodularizing my own app, I can 1000% see why Brandon and Stephen don't add comments, header comments, function comments, etc. in their example code. Having to create many files, objects, etc. it feels absolutely boilerplate-y! For instance, I have to update the header comment to reflect the correct filename, correct module (SPM isn't friendly with macros, which would make autogenerating headers possible), and the filename could certainly change considerably when developing.

Lots of their code also takes advantage of synthesized initializers (which is visually great and clean), and it would bloat the code quite a bit having to explicitly call the initializer just to ad…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by acosmicflamingo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant