Thoughts

mental health break ,./'"**^^$_---
Okay I have another weird programming language idea. Pass-by-value? pass-by-reference? What if you had to choose?
``` // There's no distinction between data types // You need to use the `new` keyword to create a new object var a = new 5; var b = new [1, 2, 3, 4]; // Read as, "c also equals b", b and c are now both pointers to the same mutable data var c = also b; c[1] = 0; print(b[1]); // prints 0, since the underlying array was mutated // x and a are both 5, but they are the same 5 var x = also a; x++; print(a); // prints 6 // Copy keyword makes a copy of the data var e = copy b; // Conceptually, moves the data in b into f. // b is now empty, an invalid reference var f = move b; ``` Writing this out I think makes it really clear that there are three distinct options. And most programming languages have kind of erratic rules that treat different data types differently. I think this would make programming a lot clearer. I don't how to do function calls or other operations yet.
Link 7:01 p.m. May 04, 2023 UTC-4