Most programming languages today fall into the paradigms of native machine code compiled ones like Rust, C, C++, etc or Bytecode compiled like Kotlin, Java, C#, etc. Even some interpreted languages like Python can be thought of as Bytecode compiled since the interpreter store the bytecode which is executed instead of the source file unless the source file is changed.

I think the main benefit of bytecode compiled programming languages is that they’re usually platform independent as long as there’s a runtime for the platform you want to use, but I also don’t know how much this matters anymore, or whether the inefficiencies of bytecode makes it worth it.

What do you think? Should new programming languages always be native machine code compiled, like Rust or C?

  • dinomug
    link
    33 years ago

    As you said, there are different paradigms, each one solves a particular problem. The most important thing is not to see these technologies as entities that repel each other, but as complementary. For example, an inventory system; the database management systems (mysql/mariadb, postgresql, etc.) are created with native machine code compiled languages, because it is necessary have a complete access to the physical resources of the computer, specially the memory, to manipulate/store the data; For the inventory, it is a good and recommended option create a simple CRUD program with a bytecode compiled language that interacts (interface/socket) with DBMS, because there is not need to worry about of memory consumption, low level hardware interaction, machine/processor architecture, portability, etc.; Your program is created and runs in a “safe environment”, the VM.

    • @AgreeableLandscapeOP
      link
      23 years ago

      Why is the inventory program recommend to be written in a bytecode language? What would be the disadvantages of writing in a native language, like how the Lemmy backend compiles to a single native executable?

      • dinomug
        link
        23 years ago

        Basically for 3 main reasons

        1. Maintenance: mostly of the software out there, specially in the non-informatic-related field, is legacy. Bytecode language programs requires less effort in its maintenance.
        2. Portability: It really doesn’t matter which machine runs your Java program, just if the JVM supports the OS for example.
        3. Wide use in the market. This one could be the most polemical because of cultural/commercial/political issues. For example mostly of the universities in the world teaches Java. There is a lot of resources of it, etc.

        – In the case of Lemmy platform, it runs over Rust. This language/technology is quite special; it supports a wide range of programming paradigms, works to a hight and low level, it is compile, but runs on the fly. In some sense takes the best of the two worlds. Just beautiful.