Declarative Programming And Testing

I delcare that this sentence is false.

When I hear something like “We don’t need to test it. It’s declarative.”, I cringe. Sometimes it’s true, sometimes not. Like most engineering decisions, It’s really a matter of context, a matter of risk and effort.

Computers do what you tell them to do. How do you know that what you are telling them to do is the right thing? Sometimes the issue is that the computer is doing exactly as you declared! We need to keep that in mind when we think “Oh, don’t worry about that. It’s declarative.”

Submit a Comment