Adding code comments in V
Imagine a situation where you have started looking at a new repository that has a lot of code and you want to quickly understand what any particular function or piece of logic does. You can spend some time looking at the logic and you might come up with an assumption of what the piece of code actually does. Often, it is a tedious task for other programmers to spend time reading the code to understand what the code is doing. Most of the time, even the programmer who wrote the code tends to forget what the logic actually does and only recollects after spending time on what they wrote.
Most of the programming languages allow you to add comments to the code. These comments can be single-line comments or multiline comments.
Single-line comments
Single-line comments are used to write short details about the code being commented on that generally fit in a line. A single-line comment starts with a double forward slash, //
, followed by the comment that you...