开发者

Is there a high level language with an interpreter, dynamic compiler and static compiler(e.g. like the c++ compiler) along with a multimedia library?

开发者 https://www.devze.com 2022-12-11 23:54 出处:网络
The interpreter and dynamic compiler would be for testing/prototyping and when im done testing i use the static compiler.开发者_JAVA技巧Java has all of these - the stock Sun JVM has both an interprete

The interpreter and dynamic compiler would be for testing/prototyping and when im done testing i use the static compiler.开发者_JAVA技巧


Java has all of these - the stock Sun JVM has both an interpreter and dynamic compiler, and the GNU Compiler for Java (GCJ) can statically compile to machine code.


There are many.

One such language is Objective Caml. Let's check it against your requirements:

  • High-level language: Caml supports functional, object-oriented, and imperative styles of programming.
  • Interpreter: The ocaml system is a read-evaluate-print loop.
  • dynamic compiler: On platforms that support dynamic loading, ocamlrun can link dynamically with C shared libraries (DLLs).
  • static compiler: Available through the -linkall flag in the compiler.
  • Multimedia: There are libraries for 2-d graphics, 3-d graphics, audio, and video.

The bigger question is finding the best tool for your job. Many languages meet those requirements, but the most used languages have the best documentation and the most tested bindings to libraries. If you're going to use a language like Caml, there should be some overriding benefit to that language that can't be found in other languages.

Good luck!


The best option for you depends on the kind of your application. If it is a real-time program, then just stay with C++ (or ever with C) because no high-level language like Ruby/Perl/Python will beat them in this domain. But if the complexity of your future program is high enough, the best option I see in Python + PyOpenGL (for graphics) +PyOpenAL (for sound) and PyODE (for real-time physics). Actually, Python's VM is fast enough but you can also (with some efforts) compile it into a platform-dependent optimized code.

Alternatively you can use PyGame for 2D graphics and a way comfortable sound/music management.

0

精彩评论

暂无评论...
验证码 换一张
取 消