#REDIRECT [[Jonathan Blow#JAI language]]
{{short description|highe performance programming language for games}}
== Introduction ==
{{Infobox programming language
| name = JAI
}}
JAI is a programming language that is intended to replace C++ for highthe development of high-performance video gamegames and complex programingsimulations. The language is being developed by [[Jonathan Blow]] and members of his company Thekla inc. The language is not available to the general public yet. BlowThe oftenauthor livesometimes streams the development of the language and of the game he his company is currently working on, which is being implemented in the new language.
At the time of writing the compiler is still written in C++, but the plan is to write it in JAI itself.
The actual pronunciation of "JAI" is up for debate, withthe Jonauthor seeming to ignore any questions about the name or it'sits pronunciation. It is not clear if it is the name that Jonis intendsintended to usebe used for the language or if it is just the file extension, with the name of the language itself being something different.
==Overview==
JAI is a statically typed, compiledstrictly languageprocedural, just like thecompiled language it is intendedsimilar to replaceC/C++. The similarities with C++ mostly stop there, however. TheIn the beginning, the design of JAI has been purposely restricted in scope in order to reduce the complexity of the language. It'sSome of the more notable features include, type inference, no header files, and arbitrary compile -time code execution for [[metaprogramming]].
Among the language, goals are a fast compilation, performanthighly optimized machine code production, and programmer enjoyment. These requirements come from Blowthe author's experience writing games in C++. He has stated that he is far more productive when programming is enjoyable.
In the beginning, in order to minimize compilation time during development, the compiler has the ability to emit poorly optimized x64 assembly code very quickly. When the maximum performance of generated code is desired the [[LLVM]] back end is used to produce optimized code.
==History==
The earliest history available about the language comecomes from a video post by Jonthe author on YouTube entitled "Ideas about a new programming language for games.", posted on September 19, 2014. At thisthe time it appearsseemed thatonly Jonan open discussion, hadwithout no intentionsintention of actually implementing a new language. A few weeks later Jonthe author presented a demo of the language. At this stage, the language was being implemented by first generating C source code that was then itself compiled, much the same as early C++ compilers operated. Even at this early date, key features of the language were present, such as compile -time code execution.
JonathonTill then the author continued to develop the language, hosting twitch streams and and posting progress reports on YouTube. He has kept the language and source restricted to his company during development, with plans to release it to the wider public once the compiler had been moved into a more robust state.
In a tweet posted on November 1, 2019, Jonit was announced that hethe hadcurrent releasedcompiler thewas compilerreleased to ana unknownbusiness numberpartner offor peopleevaluation outsidepurposes. theMaybe a company interested in writing some editor, debugger or other RAD tools for the language.
==Syntax==
BlowThe author has stated during his Twitch streams that the syntax has not been finalized and is open to altering it in the future. The syntax of JAI is broadly derived from C++ and therefore C syntax. Blocks are delineated by curly brackets, and semicolons are required to terminatedterminate a statement.
'''Variable Declaration'''
The name of a variable is written first, followed by the type, separated by a colon. If the variable is to be initialized explicitly then an assignment can follow. <code>a: int = 0;</code>
Because of JAI's type inference feature often times the type of a declaration can be omitted. The previous example could just as validly be written as <code>a := 0;</code>.▼
<code>a := 0;</code>.
==External links==
==References==
▲Because of JAI's type inference feature often times the type of a declaration can be omitted. The previous example could just as validly be written as <code>a := 0;</code>.
|