Julia (programming language): Difference between revisions

Content deleted Content added
m 1.12.0-rc1 is out; rc2 coming
AnomieBOT (talk | contribs)
Rescuing orphaned refs ("infoworld" from rev 1301081049)
 
(One intermediate revision by one other user not shown)
Line 72:
}}
 
'''Julia''' is a [[dynamic programming language|dynamic]] [[general-purpose programming language|general-purpose]] [[programming language]]. As a [[high-level programming language|high-level]] language, distinctive aspects of Julia's design include a type system with [[parametric polymorphism]], the use of [[multiple dispatch]] as a core [[programming paradigm]], [[just-in-time compilation|just-in-time]] (JIT) compilation and a parallel [[tracing garbage collection|garbage collection]] implementation. Notably Julia does not support [[Class (computer programming)|classes]] with [[Encapsulation (computer programming)|encapsulated]] methods but instead relies on the types of all of a function's arguments to determine which method will be called.
'''Julia''' is a [[high-level programming language|high-level]], [[general-purpose programming language|general-purpose]]<ref name="general purpose">{{Cite web |last1=Fischer |first1=Keno |last2=Nash |first2=Jameson |title=Growing a Compiler - Getting to Machine Learning from a General Purpose Compiler |url=https://juliahub.com/blog/2019/02/growing-a-compiler/ |archive-url=https://web.archive.org/web/20221128011349/https://juliahub.com/blog/2019/02/growing-a-compiler/ |url-status=dead |archive-date=28 November 2022 |access-date=2022-11-16 |website=juliahub.com }}</ref> [[dynamic programming language|dynamic]] [[programming language]] designed to be fast and productive,<ref name=Fastest /> e.g., for data science, artificial intelligence, machine learning, modeling and simulation, and is most commonly used for [[numerical analysis]] and [[computational science]].<ref>{{Cite web
| date = 15 October 2012
| last = Bryant
| first = Avi
| title = Matlab, R, and Julia: Languages for data analysis
| url = http://radar.oreilly.com/2012/10/matlab-r-julia-languages-for-data-analysis.html
| archive-url = https://web.archive.org/web/20140426110631/https://strata.oreilly.com/2012/10/matlab-r-julia-languages-for-data-analysis.html
| archive-date= 2014-04-26
| publisher = O'Reilly Strata
}}</ref><ref name="infoworld">{{Cite magazine
| last = Krill
| first = Paul
| title = New Julia language seeks to be the C for scientists
| url = https://www.infoworld.com/article/2616709/new-julia-language-seeks-to-be-the-c-for-scientists.html
| magazine = InfoWorld
| date = 18 April 2012
| access-date = 4 July 2021
| archive-date= 13 September 2014
| archive-url = https://web.archive.org/web/20140913234252/http://www.infoworld.com/d/application-development/new-julia-language-seeks-be-the-c-scientists-190818
| url-status = live
}}</ref><ref>{{Cite magazine
| last = Finley
| first = Klint
| title = Out in the Open: Man Creates One Programming Language to Rule Them All
| url = https://www.wired.com/2014/02/julia/
| magazine = Wired
| date = 3 February 2014
| access-date = 8 March 2017
| archive-date= 20 December 2016
| archive-url = https://web.archive.org/web/20161220064258/https://www.wired.com/2014/02/julia/
| url-status = live
}}</ref>
 
Distinctive aspects of Julia's design include a type system with [[parametric polymorphism]] and the use of [[multiple dispatch]] as a core [[programming paradigm]], a default [[just-in-time compilation|just-in-time]] (JIT) compiler<ref name="general purpose" /><ref>{{Cite web |title=Sysimages · PackageCompiler |url=https://julialang.github.io/PackageCompiler.jl/stable/sysimages.html#Creating-a-sysimage-using-PackageCompiler |access-date=2023-04-10 |website=julialang.github.io |archive-date=10 April 2023 |archive-url=https://web.archive.org/web/20230410160253/https://julialang.github.io/PackageCompiler.jl/stable/sysimages.html#Creating-a-sysimage-using-PackageCompiler |url-status=live }}</ref> (with support for [[ahead-of-time compilation]]<ref name="PackageCompiler.jl" /><ref>{{Cite web |title=julia/doc/src/devdocs/aot.md at master · JuliaLang/julia |url=https://github.com/JuliaLang/julia/blob/master/doc/src/devdocs/aot.md |access-date=2023-10-03 |website=GitHub |language=en |archive-date=3 October 2023 |archive-url=https://web.archive.org/web/20231003164500/https://github.com/JuliaLang/julia/blob/master/doc/src/devdocs/aot.md |url-status=live }}</ref><ref>{{Cite web |title=System Image Building · The Julia Language |url=https://docs.julialang.org/en/v1/devdocs/sysimg/ |access-date=2023-10-03 |website=docs.julialang.org}}</ref>) and an [[tracing garbage collection|efficient (multi-threaded) garbage collection]] implementation.<ref>{{Cite newsgroup |url=https://groups.google.com/forum/#!topic/julia-users/6_XvoLBzN60 |title=Suspending Garbage Collection for Performance...good idea or bad idea? |website=Groups.google.com |access-date=2017-05-31 |archive-date=14 February 2012 |archive-url=https://web.archive.org/web/20120214124121/http://groups.google.com/group/web2py/browse_thread/thread/c81061bc00c6181e#!topic/julia-users/6_XvoLBzN60 |url-status=live }}</ref> Notably Julia does not support classes with encapsulated methods and instead it relies on structs with generic methods/functions not tied to them.
 
By default, Julia is run similarly to scripting languages, using its runtime, and allows for [[read–eval–print loop|interactions]],<ref name="PackageCompiler.jl" /> but Julia programs/[[source code]] can also optionally be sent to users in one ready-to-install/run file, which can be made quickly, not needing anything preinstalled.<ref name=AppBundler.jl /> <!-- controversial on Talk, page, for now commenting out, may move out of lead: Julia programs can also be (separately) compiled to [[binary executable]]s, even allowing no-source-code distribution, and the executables can get much smaller with Julia 1.12. Such compilation is not needed for speed, though it can decrease constant-factor startup cost, since Julia is also compiled when running interactively, but it can help with hiding source code. Features of the language can be separately compiled, so Julia can be used, for example, with its runtime or without it (which allows for smaller executables and libraries but is limited in capabilities). -->
Line 122 ⟶ 89:
 
==History==
Work on Julia began in 2009, when [[Jeff Bezanson (programmer)|Jeff Bezanson]], [[Stefan Karpinski]], [[Viral B. Shah]], and [[Alan Edelman]] set out to create a free language that was both high-level and fast. On 14 February 2012, the team launched a website with a blog post explaining the language's mission.<ref name="announcement" /> In an interview with ''[[InfoWorld]]'' in April 2012, Karpinski said of the name "Julia": "There's no good reason, really. It just seemed like a pretty name."<ref name="infoworld" /> Bezanson said he chose the name on the recommendation of a friend,<ref>{{Cite web |last1=Torre |first1=Charles |title=Stefan Karpinski and Jeff Bezanson on Julia |url=https://channel9.msdn.com/Blogs/Charles/Stefan-Karpinski-and-Jeff-Bezanson-Julia-Programming-Language |website=Channel 9 |publisher=MSDN |access-date=4 December 2018 |archive-date=4 December 2018 |archive-url=https://web.archive.org/web/20181204102053/https://channel9.msdn.com/Blogs/Charles/Stefan-Karpinski-and-Jeff-Bezanson-Julia-Programming-Language |url-status=live }}</ref> then years later wrote:magazine
| last = BryantKrill
| first = AviPaul
| title = New Julia language seeks to be the C for scientists
| url = https://www.infoworld.com/article/2616709/new-julia-language-seeks-to-be-the-c-for-scientists.html
| magazine = InfoWorld
| date = 1518 OctoberApril 2012
| access-date = 4 July 2021
| archive-date= 13 September 2014-04-26
| archive-url = https://web.archive.org/web/20140913234252/http://www.infoworld.com/d/application-development/new-julia-language-seeks-be-the-c-scientists-190818
| url-status = live
}}</ref> Bezanson said he chose the name on the recommendation of a friend,<ref>{{Cite web |last1=Torre |first1=Charles |title=Stefan Karpinski and Jeff Bezanson on Julia |url=https://channel9.msdn.com/Blogs/Charles/Stefan-Karpinski-and-Jeff-Bezanson-Julia-Programming-Language |website=Channel 9 |publisher=MSDN |access-date=4 December 2018 |archive-date=4 December 2018 |archive-url=https://web.archive.org/web/20181204102053/https://channel9.msdn.com/Blogs/Charles/Stefan-Karpinski-and-Jeff-Bezanson-Julia-Programming-Language |url-status=live }}</ref> then years later wrote:
 
{{blockquote|Maybe julia stands for "[[Jeff Bezanson (programmer)|Jeff]]'s [[MLisp|uncommon lisp]] is automated"?<ref>{{Cite web |last1=Bezanson |first1=Jeff |title=CAS Benchmarks |url=https://discourse.julialang.org/t/cas-benchmarks-symbolics-jl-and-maxima/58359/17 |website=discourse.julialang.org |date=2 April 2021 |access-date=2 April 2021 |archive-date=2 April 2021 |archive-url=https://web.archive.org/web/20210402224346/https://discourse.julialang.org/t/cas-benchmarks-symbolics-jl-and-maxima/58359/17 |url-status=live }}</ref>}}