DEV Community

loading...

Discussion on: Making Sense of Syntax

perpetual_education profile image
perpetual . education

we need to understand what the original code is trying to achieve

This is what the code should describe (not just to you - but to your average programmer)

Thread Thread
pentacular profile image
pentacular

I don't think that's a reasonable expectation.

The code will describe the what and the how, but I have yet to see a programming language which encapsulates the why of it.

If your argument is that it should contain comments which explain why this is being done, then I agree.

In which case, I guess your point is that the snippet provided is defective because it lacks this. :)