I'm a relatively beginner programmer, who has done some Visual Basic, Python, and recently started looking into Java or C++ for a faster language. The main reason for these languages being faster seemed to be that they were compiled (or for Java, mostly compiled). This led me to the question, would it be possible to make an easier language like Python that is compiled for speed?
The advantages that interpreted languages have seems mainly to be the ability to have variables dynamic in scope and type. However, overall this (in my small experience) shortens code length by a small amount (probably under 10%, adding a public modifier or int is just one word). Also I'm not sure whether garbage collection is possible in a true compiled language (like c++), but it is available in java which is just about as fast/faster as C++.
Is it possible to make a language with very easy syntax (like Python), with a few small changes (static variables), and allow it to be compiled in Java/C++, and from there compiled into a very fast program?
For example: in the very limited view of java I have now, to print something you must write:
System.out.println("print this");
In Python 3, however, you write:
print("print this")
If someone wrote in this theoretical language print("print this")
, it would be compiled to System.out.println("print this");
and then compiled into JVM bytecode. This type of language could probably shorten production time while still having a fast execution speed.