3 ms·
What are you guys think about these 'comments are more important than code' languages/dialects. I'm kind of sceptical because comments can lie but code cannot.
by brodo 13y ago
What are you guys think about these 'comments are more important than code' languages/dialects. I'm kind of sceptical because comments can lie but code cannot.
- Artemis2 13y agoYeah, comment-centric languages are not my preference, as over-commented code tends to happen way more often.
- spo81rty 13y agoComments blend in with the code too much for me.
- rsl7 13y agoIt depends on how much you must work with other people on the code. Sometimes it's helpful to think about your code as if you are writing it for other people -- which you are, even if that person is you in the future. The choices you make can result in the difference between a love letter and hate mail, even if it does the same thing in the end. I kind of like the idea of emphasizing the comments in this way, turning the source file into a document, but I have never personally used anything like it. So it feels both kind of interesting/attractive, but also weird.
- brodo 13y agoInteresting. Considering that, I think that it is a fundamental problem of current programming languages that you cannot address both the computer and the human in the language itself. (comments are an escape mechanism)
- rsl7 13y agoand my comments are sometimes about what was tried but didn't work, or alternate ideas that were considered, along with commented out code and examples.
- dclowd9901 13y agoI find I have to comment quite a bit with JS because so much can be left up to interpretation, even in the code. It's the only time I wish there was some manner of type safety in JS, even if only in expression -- it sucks when an out-of-date comment gives the wrong type of an incoming param, and it's not until you actually step through that you see that.
- TazeTSchnitzel 13y agoYou might like Microsoft's TypeScript then. It's a JavaScript superset adding ES6-style classes and modules, and optional static typing.