| ▲ | ajkjk 8 hours ago | |||||||
I kinda like viewing this as similar to coordinate-invariance in physics / geometry. A programming language is effectively a function from textual programs to behaviors; this serves the same role as a coordinate system on a space, which is a function from coordinates to points. Naturally many different programs and programming languages can describe the same behavior, especially if you forget about implementation-specific details like memory layout or class structures. LLM code generation is just another piece of the same model: turns out that to some degree you can use English+LLMs as coordinate systems for the textual programs. I expect that over time we will adopt a perspective on programming that the code doesn't matter at all; each engineer can bring whatever syntax or language they prefer, and it will be freely translated into isomorphic code in other languages as necessary to run in whatever setting necessary. Probably we will settle on an interchange format which is somehow as close as possible to the "intent" of the code, with all of the language-specific concepts stripped away, and then all a language will be is a toolbox that an engineer carries with them of their favorite ways to express concepts. | ||||||||
| ▲ | fc417fc802 an hour ago | parent | next [-] | |||||||
I've also found myself thinking a lot about isomorphic languages, particularly the edge cases I run into when I start attempting to run through potential mappings for various aspects of syntax or language features in my mind. > with all of the language-specific concepts stripped away I've arrived at a somewhat different conclusion. I think we'll arrive at a maximally cumbersome, maximally verbose interchange format that isn't intended to be parsed by a human. One capable of expressing literally every feature of every language that it officially supports. Otherwise translation will necessarily be lossy and round trips with perfect fidelity impossible. Even then certain paradigms that are common today simply don't seem possible to translate between arbitrary language pairs. I think the client language would also need to be tailored to support the paradigm. Consider how you would go about abstracting (for example) longjump in C and how fundamentally incompatible that is with (for example) Java in its present form. Or how you would deal with differences in ordering requirements as well as any implicit synchronization points between languages. I figure that C++ will be a viable candidate for the interchange format if we wait another 10 years or so. Just need to add a borrow checker, first class continuations, full blown AST macros, and a runtime "eval" facility. It's slightly tongue in cheek but it's wild to think that actually it could almost work (including the bit about not being intended to be parsed by a human). | ||||||||
| ▲ | lacunary 8 hours ago | parent | prev | next [-] | |||||||
but the interesting thing about coordinate systems is that they do matter, a lot! many problems are much much easier to solve in one coordinate system than another. | ||||||||
| ||||||||
| ▲ | TomasBM 5 hours ago | parent | prev | next [-] | |||||||
I think this is certainly true, except for the "each engineer [bringing] whatever syntax or language" point. At some stage, I expect that we will know what is the set of "optimal" computer languages for the interface between the programmer and the machine code. Natural languages can't really capture the lower-level details of a program, but there's (probably) also no need for all N different ways to write a for loop. | ||||||||
| ▲ | worthless-trash 6 hours ago | parent | prev [-] | |||||||
I would dearly love this to happen. There are some corner cases that won't fit the translation layer well, for example almost any beam languages philosophy of let it crash.. I imagine those languages will be left by the wayside. | ||||||||