DEV Community

Discussion on: Should comments in code be considered failures in coding?

 
stereobooster profile image
stereobooster

To be fair most of my examples can be put in the top of a function, including definitions, explanation of business rules, explanation of code optimizations, etc. So I don't see any contradiction anymore

/* This is classical implementation of Dijkstra algorithm, except that we skip allocation of heap in ... which makes it a bit slower, but take less memory */
const traverseGraph = () => {}

It seems we can agree on this