zoukankan      html  css  js  c++  java
  • Compiled Language vs Scripting Language

    Referrence: Blog

    Compiled Languages

    Example: C, C++, Java

    Source code needs to be compiled into bits and bytes that can be executed by computers.

    Java: source code is compiled into byte code, and run on JVM (needs "Java" operation to interprete byte code)

    C/C++: source code is compiled into machine code, which is a lot more complex than byte code. Once the machine code is generated, we can execute it by "./", without any other interpreters or executables.

    Scripting Languages

    Example: Python, Perl, PHP, Ruby

    Scripting languages do not need compilation. They rely on source code all the time.

    They use interpreters to translate source code to machine executable code on the fly.

    Compiled Languages vs Scripting Languages

    1. Scripting language is easy to debug

    For scripting language, when you finds a bug during running, you just fix the bug and reload application - there is no need to restart or recompile.

    2. Performance problem

    Translating on the fly can affect the application’s performance. Typically, the pre-compiled code is faster than on the fly translating.

    But, good news is, there are ways to speed up scripted languages, including techniques such as code caching and persistent interpreters.

  • 相关阅读:
    General error: 1364 Field 'id' doesn't have a default value
    数据库 主键、外键和索引的区别
    宝塔升级
    服务器数据库性能调优
    关于TP5.1的跳转
    用PHP写九九乘法表
    Java中的接口
    Java中的继承
    超市库存管理系统
    Java中的封装
  • 原文地址:https://www.cnblogs.com/ireneyanglan/p/4944161.html
Copyright © 2011-2022 走看看