Source code can be written in natural language instead of computer garbage

Projects can be shared using natural language instead of source code and then have the AI convert it into source code before compiling it… essentially making it a pre-compile step.

It would save a lot of wasted time reading code if the code were like this:

"print out every number prime number from 1 to 100"

and not

function main() {
  for (var i=1; i<100; i++) {
      if (isPrime(i)) {
         console.log(i);
      }
   }
}
function isPrime(n) {
   for (var i=2; i<n; i++) {
        if ((n % i) == 0) { 
           if (i != n) {
              if (n != 1) {
                 return false;
              }
           }
      }
   }
   return true;
}
main();

I feel like code could just be saved as regular text documents in normal language… making source code actually readable so that people can know what a program does before they open it… or find all the bugs in the code in like an hour instead of a month or two.

5 Likes

Clearly written from the perspective of someone who has never actually written any serious code.