5 ms·
Let me preface this by saying I used LISP professionally in the '80's for about ten years. It's a great language. It is right up there at the top of my list w
by robomartin 3y ago
Let me preface this by saying I used LISP professionally in the '80's for about ten years.
It's a great language. It is right up there at the top of my list with Assembler, APL and Forth as languages that taught me so much more than the typical C-like language path most people are exposed to today. And, yes, I used those languages professionally for years.
I have always said it is important to learn these non-C languages.
However...
> I've spent some time contemplating future-proof programming languages because I want to ensure that code I write will be usable in the future.
I think it is clear that it will not be long until you can use an AI-based tool to translate any program from language A to language B. And, in fact, likely improve, maintain and extend it.
For example, you might be able to have the AI tool write a function or module in assembler targeted at different processors and be able to accelerate critical code in a platform-specific manner that would be almost impossible for most developers to manage and maintain today.
I experimented with some of this using ChatGPT. We built a product using MicroPython that require hard real time performance. Sure, MicroPython was not the right choice to begin with. This was one of those projects where we walked into something that morphed and we were stuck. Being that I am perfectly comfortable in assembler, I replaced chunks of code with ARM assembly routings. The performance boost was massive, of course.
As an experiment, I wrote a specification for one of those modules and asked ChatGPT to write the code in ARM assembler. It took all of five seconds to get a listing. Let's just say it took me a lot longer. The code was not optimal, yet, it worked just fine. Someone like me, with experience in the domain, could easily take that as a starting point and improve from there. Just for kicks, I asked ChatGPT to write the same code in C, C++, JS, Python, 8080, 8085, 6502, 68K and x86 assembler. That probably took a minute or so. Did not test all of the generated code. All of it looked like it would run just fine.
In other words, I believe that, today, the only reason to pick a language is likely something like: It's what I know and it has the libraries, frameworks and support I need. In some cases, it's because it's the only way to achieve required performance (example: Python is 70+ times slower than C).
Code longevity is not likely to be an issue at all.
- behnamoh 3y ago> In other words, I believe that, today, the only reason to pick a language is likely something like: It's what I know and it has the libraries, frameworks and support I need. I would take it even further and say that in the near future, everyone will have their own beloved DSL completely customized to their needs and the AI will be able to translate any code to your favorite DSL. You’ll code and commit the changes and the AI will take care of that and convert it back to other peoples’ DSL’s.
- nescioquid 3y agoI was going to reply by suggesting emacs lisp as a candidate language, really making it a bet on how long emacs will be around. Will people (commonly) be using emacs in 50 years? I think people will, though I hesitate to say so. If it turns out that we converge on text as a necessary interface to a computer (at least in some cases), maybe the bet pays off. But I think your idea that the expression of a program will become fungible or machine-translatable is much more salient. Though if the program itself depends on a whole chain of ancient dependencies and idioms (think a VB UI in front of an Access DB) might run afoul of infinite regress. So, to really future-proof on a long time-horizon, it seems you need to be preoccupied with a lot more than the programming language.
- at_a_remove 3y agoI strongly agree. For me, it's the libraries. Not just having libraries, but having One Obvious Choice. I don't want to compare and contrast libraries, realize that one has sixty percent of what I need, the other has eighty, and they overlap for about forty percent of it. More and more, I think in terms of algorithms and data structures over anything else. Being able to express those fluently is my focus. So to bring it around to your comment, what I like to imagine is that someone designs a programming language where the focus is on the ability of the language to be translated to other languages. Then, libraries will be built out, everything that is in standard Python and more. Once a translator is built and tweaked, we could have functional (not like the paradigm) libraries for any langue you fancy. Yes, the translator would need to be more constrained to avoid "hallucination" and I am sure the resultant libraries would be slow, inefficient, and so on, but they would be there. As it stands now, I think there's a lot of rebuilding the wheel in scores of languages. I wouldn't say that the effort is wasted, exactly, but I can imagine talented programmers making better use of their time.