General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
p11
ThePrimeTime
comments
Comments by "p11" (@porky1118) on "" video.
I still like the idea of natural language inspired programming language. I especially like the implicit nesting aspect of natural languages (subordinate clauses), and the implicit temporary variables (pronouns, articles). So a function could be defined like this: fn inerse_of_product_of_sum_and_difference (x: int, y: int) let sum = x + y; let diff = x - y; 1 / (sum * diff) When using pronouns and articles, you could do it like this: fn inverse_of_product_of_sum_and_difference: sum the first int and the second int diff the first int and the second int product this sum and this diff div 1 it "the" would access function parameters. "this" would access the result of the most recent call of this function. "it" would access the most recent result of any function call (the previous line/sentence). Also "the" and "this" would implicitly expect one single objects after them. Also "first" and "second". So the implicit nesting of the sum could be "sum(the(first(int)) and the(second(int)))"
1