yet another DHT11 Class for Arduino

Quote from: robtillaart on Today at 09:37:06 am
Final note, I see you used the goto statement to handle error conditions. Although you did it in a structured way to handle error conditions it is discouraged as goto's can disrupt code/stack/heap.

I'm not sure that I follow. Is there some flaw in the compiler that causes it not to properly handle gotos? From a structured programming perspective, neither goto nor having multiple returns is great, but I prefer this over multiple returns.

Thanks again!

Andy

No the biggest problem is programmers working further from your code.
Goto's jump in the code and if they aren't understood well a minor change can easily break the logic.
Yes that is also true for goto-less code but in my experience code with goto's often become spaghetti.
Maintainable code looks more like lasagne (layered architecture) :wink: