3 ms·
> Creating this spec is often going to be harder than writing a single compliant program. I’m not sure if I agree. A good spec will specify what the program is
by derrak 7mo ago
> Creating this spec is often going to be harder than writing a single compliant program.
I’m not sure if I agree. A good spec will specify what the program is supposed to do rather than how the program should do that thing. It should be easier to specify what rather than how. Moreover, it should be standard practice to express what before you start writing how.
I see some people pushing back on this by saying two programs that satisfy the same spec might have different performance or security properties. That is correct and if you care about those things, you should specify them. Writing down these properties, e.g., “the program is O(n) where n is blah” should be much easier than implementing a non-trivial linear time algorithm founded in deep ideas.