3 ms·
I like to think of the square root of x function: r such that r * r = x That’s a specification that gives you no knowledge how to solve the problem. You c
by ghayes 6y ago
I like to think of the square root of x function:
r such that r * r = x
That’s a specification that gives you no knowledge how to solve the problem. You can definitely have precise specifications that do not directly correlate to machine instructions.
- a1369209993 6y agoAnd: print "Hello, World!" gives no knowledge how to put text on the screen. Conversely, there's no reason a standard library couldn't include: fn (*) :: Num -> Num -> Num fn (a * b) = [machine code goes here] un (_ * d) n = n/d un (d * _) n = n/d un (_ * _) n = sqrt(n) or similar.
- earleybird 6y agoWell then, "all you need to do" is convert your non constructive proof into a constructive one - et, voila :-)
- astrobe_ 6y agoI like this answer because it says it will require someone with specific knowledge and specific training doing a specific job anyway... Also "anyway" a specification is always incomplete. It's part of the programmers' job to fill the gaps with something sensible, and when they have no idea what to do, to point out that some corner case was overlooked. This is where programmers sometimes start to feel like Lieutenant Columbo: at first everyone is nice, but people become more and more irritated as the pesky cop asks more and more embarrassing questions.
- ineedasername 6y agoat first everyone is nice, but people become more and more irritated as the pesky cop asks more and more embarrassing questions. You just summed up about 20% of my job
- bryal 6y agoIsn't that basically how you'd write it in Prolog?