|
Julia is a high-level dynamic programming language designed to address the requirements of high-performance numerical and scientific computing while also being effective for general-purpose programming,〔(【引用サイトリンク】 type = official website )〕 web use〔(【引用サイトリンク】title=Escher lets you build beautiful interactive Web UIs in Julia )〕〔(【引用サイトリンク】title=Getting Started with Node Julia )〕 or as a specification language. Distinctive aspects of Julia's design include having a type system with parametric types in a fully dynamic programming language, and adopting multiple dispatch as its core programming paradigm. It allows concurrent, parallel and distributed computing, and direct calling of C and Fortran libraries without glue code. Julia is garbage-collected, uses eager evaluation, and includes efficient libraries for floating-point calculations, linear algebra, random number generation, fast Fourier transforms, and regular expression matching. ==Language features== According to the official website, the main features of the language are: * Multiple dispatch: providing ability to define function behavior across many combinations of argument types * Dynamic type system: types for documentation, optimization, and dispatch * Good performance, approaching that of statically-typed languages like C * Built-in package manager * Lisp-like macros and other metaprogramming facilities * Call Python functions: use the PyCall package * Call C functions directly: no wrappers or special APIs * Powerful shell-like capabilities for managing other processes * Designed for parallelism and distributed computation * Coroutines: lightweight "green" threading * User-defined types are as fast and compact as built-ins * Automatic generation of efficient, specialized code for different argument types * Elegant and extensible conversions and promotions for numeric and other types * Efficient support for Unicode, including but not limited to UTF-8 Multiple dispatch (also known as multimethods in Lisp) is a generalization of single dispatch – the polymorphic mechanism used in common object oriented (OO) languages – that uses inheritance. In Julia, all concrete types are subtypes of abstract types, directly or indirectly subtypes of the "Any" type, which is the top of the type hierarchy. Concrete types can not be subtyped, but composition is used over inheritance, that is used by traditional object-oriented languages (see also Inheritance vs subtyping). Julia draws significant inspiration from various dialects of Lisp, including Scheme and Common Lisp, and it shares many features with Dylan (such as an ALGOL-like free-form infix syntax rather than a Lisp-like prefix syntax, while in Julia "everything"〔http://learnxinyminutes.com/docs/julia/〕 is an expression) – also a multiple-dispatch-oriented dynamic language – and Fortress, another numerical programming language with multiple dispatch and a sophisticated parametric type system. While CLOS adds multiple dispatch to Common Lisp, the addition is opt-in: only user-defined functions explicitly declared to be generic can be extended with new multimethods. Julia's macros – also known as hygienic macros, used to implement metaprogramming, similar to macros used in Lisp – are more powerful and different from non-hygienic macros used in some other languages such as C. In Julia, Dylan and Fortress, on the other hand, this extensibility is the default, and the system's built-in functions are all generic and extensible. In Dylan, multiple dispatch is as fundamental as it is in Julia: all user-defined functions and even basic built-in operations like + are generic. Dylan's type system, however, does not fully support parametric types, which are more typical of the ML lineage of languages. By default, CLOS does not allow for dispatch on Common Lisp's parametric types; such extended dispatch semantics can only be added as an extension through the CLOS Metaobject Protocol. By convergent design, Fortress also features multiple dispatch on parametric types; unlike Julia, however, Fortress is statically rather than dynamically typed, with separate compilation and execution phases. The language features are summarized in the following table:抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Julia (programming language)」の詳細全文を読む スポンサード リンク
|