3 ms·
Okay, so I asked ChatGPT4 to "Please program a short pattern matcher in Utero." At first it complained: "I'm sorry, but as of my knowledge cut-off in September
by abrax3141 3y ago
Okay, so I asked ChatGPT4 to "Please program a short pattern matcher in Utero." At first it complained: "I'm sorry, but as of my knowledge cut-off in September 2021, there's no programming language called "Utero". Utero is the Latin term for womb, it's not known as a coding or programming language." But I insisted: "Make up what a language that might be called "Utero" would look like if you were to program factorial in it." Here's what it said:
Designing a hypothetical programming language named "Utero" is a creative exercise, and the language's structure and syntax could take any form. For the sake of this example, let's envision "Utero" as a language inspired by human biology, in which functions are organs and code blocks are cells.
Factorial is the product of an integer and all the integers below it, and here's how it might look in our imagined Utero:
Organ factorial(Num n) cells:
if (n equals 0) then:
give 1;
else:
give n times factorial(n minus 1);
endif;
endcells;