Head_on_a_Stick wrote:@OP: surely this thread shows exactly why "human-language-level programming" [sic] would be a bad idea — the inherent ambiguity is appalling...
@Head_on_a_Stick, @jibberjabber,jibberjabber wrote:AgreedHead_on_a_Stick wrote:@OP: surely this thread shows exactly why "human-language-level programming" [sic] would be a bad idea — the inherent ambiguity is appalling...
--snip--.
An intelligent compiler will ask for clarification whenever there’s an ambiguity and may suggest improved wordings to resolve the issue. Writing a program will end up being a conversation with an intelligent machine which anyone could handle even if they know nothing about programming - it will be a collaboration with an intelligent system which is in itself an expert programmer. The error messages will be comments and questions just like the ones you’d get if you were co-writing a program with a human programmer. (“When you say “print the result of that part”, do you mean this part [a section of the code is highlighted], and do you want it printed to the screen or the printer?”)
None of that will stop you putting in a line of C or any other programming language if you want to, but most of the work will simply be done in natural language, typically at a much higher level with the compiler working out how to carry out the tasks asked of it. The end user will also become a programmer, telling the machine how (s)he would prefer things to be done, and the machine will comply. That will rarely be done through anything other than natural language.
Where natural language is ambiguous, the machine can simply ask for clarification to make sure it has understood the instruction the right way, and if it hasn’t, it can help the programmer improve the wording of the instruction.