About Julia


May 14, 2021 00:00 Julia


Table of contents


Brief introduction

Julia is a flexible dynamic language for scientific and numerical calculations, with performance comparable to traditional static type languages.

Because Julia's compiler is different from interpreters like Python or R, you may first notice that Julia's performance is less intuitive. I f you find something slower, we strongly recommend that you read through the Code Performance Optimization section before making any attempts. O nce you understand how Julia works, you can write code that is as fast as C.

By using type inference and instant (JIT) compilation, as well as LLVM, Julia has optional type declaration, overloading, high performance, and more. J ulia is a multi-programming paradigm that includes instructional, functional, and object-oriented programming. I t provides simple and concise advanced numerical calculations, similar to R, MATLAB, and Python, and supports general-purpose programming. To do this, Julia has referenced a number of popular dynamic languages based on mathematical programming languages: Lisp, Perl, Python, Lua, and Ruby.

The biggest difference between Julia and traditional dynamic languages is:

  • The core language is small; the standard library is written by Julia herself, and is based on operations such as integer operations

  • Perfect type, easy to construct objects and make type declarations
  • Function overloading based on parameter types
  • Different parameter types automatically generate efficient, dedicated code
  • High performance, close to static compilation languages, such as C languages

Dynamic languages are typed: each object, whether basic or user-defined, has a type. M any dynamic languages do not have a type declaration, which means that it cannot tell the type of compiler value or accurately determine the type. T he static language must tell the compiler the type of value, which exists only at compile time and cannot be changed at runtime. In Julia, the type itself is a runtime object, and it can also pass information to the compiler.

Overloaded functions are distinguished by the type of argument (argument list), and the type of argument passed in when the function is called determines which function is selected for the call. T his approach is more natural for program design in the field of mathematics than for traditional object-oriented program design methods that manipulate an object. I n Julia the operator is simply an alias for the function. Programmers can define a new method of "plus" for new data types, and the original code can be seamlessly overloaded on the new data type.

Because of runtime type inference (thanks to optional type declarations) and the ability to value performance from the start, Julia's computing performance exceeds other dynamic languages and is even comparable to static compilation languages. Performance has always been a decisive factor in big data processing: data volumes have been growing under Moore's Law for the past decade.

Julia wants to be an easy-to-use, powerful, and efficient language like never before. In addition, Julia's strengths include:

  • Free Open Source (MIT Protocol)
  • Custom types are just as efficient and compact as built-in types
  • There is no need to quantify code;
  • Designed for parallel and distributed computing
  • Lightweight "green" thread (co-program)
  • Low-key and type system
  • Elegant, scalable type conversion
  • Efficient support for Unicode, including and not just UTF-8
  • Call C functions directly (no encapsulation or API required)
  • The ability to manage other processes as powerfully as a shell
  • Macros like Lisp and other metaprogramming tools