logoalt Hacker News

drfloyd51 • today at 1:34 AM • 0 replies • view on HN

I imagine a kind of language which is just a bunch of declarative statements about conditions and what should happen. Basically BDD. Maybe we will just write the “unit tests” in human and AI writes more comprehensive specification to fill in the blank and for us to modify. And then AI makes code that satisfies the spec.

I don’t believe that source code is a spec. Source code has real time manipulation a kind of temporal dependency. Specs are declarative.

The difference is a spec would say: adding two and three should equal five. Code says you have a variable give it the value two. Now add three to it. Return that value. Maybe a unit test to assert it returned 5. Code defines how a spec is satisfied.