The paper describes an interesting experiment of using the ChatGPT 3.5 model for translating programming languages…
ABSTRACT
Ever since ChatGPT 3 appeared, the general public, including the professional public, has mostly been delighted with its surprising capabilities.
In the last year, we have also “played” with ChatGPT 3.5 several times. We wanted to see what its capabilities are in translating programming code from one programming language to another.
Specifically, we used Java code from our lecture “Parallel Programming in Java” (CASE 2017) and Scala code from our lecture “Covariance and Seven OOPLs” (CASE 2022).
The results are different (and expected): sometimes ChatGPT 3.5 made a very good translation, sometimes it made mistakes that could be fixed relatively easily, sometimes it almost completely failed.
This convinces us even more of the correctness of the opinion (which we also expressed in the lecture “Prolog and ‘classical’ artificial intelligence”, CASE 2023) that even better results will come through a hybrid AI, which is a combination of statistical AI (which includes ChatGPT 3.5) and symbolic (“classic”) AI.