# Programming Languages in the Wild 1) For discussion, you chose the programming language: Elixir 2) This language is: General Purpose (I think) 3) Is this language Turing complete?: Yes ## Uses 4) For what killer app, projects, or historical reason is this language best known or used ?: Elixir, similar to its parent language Erlang, is best known for its use in building concurrent, distributed, and fault-tolerant systems. Erlang was built to be used for telephone applications, meaning that in order for the functionality to be continuous, Erlang had to be low-latency, stable, and able to function even when errors occur. Elixir is built off of Erlang and runs on the Erlang virtual machine, a virtual environment that simulates a computer system and runs Erlang code on it, which is great at optimizing Erlang and Elixir code to run concurrently, or at the same time, allowing for more to get done at once. Elixir, which is more geared towards backend web development, takes these perks of Erlang and translates into a more web-friendly language that is more similar syntactically to Ruby. 5) Is the answer to 4, which the language is known for, due to language features, community support or libraries, or something else?: Since Elixir can be compiled down to bytecode that can be run on the Erlang Virtual Machine, it benefits from the concurrency and optimization that the Erlang Virtual Machine has been built for. Moreover, Elixir as a language utilizes threads of code execution, called processes, that are independent from one another and exchange information between processes through messages. Because these processes do not have a lot of overhead, there can be hundreds of processes running on one machine at the same time, making the execution of code much faster. Moreover, since each process is independent, the Erlang VM can garbage collect independent processes one by one, which is much more space-efficient. Another perk of the independence of processes is that if one process fails, that doesn't mean that an entire system will fail, since all other processes can still run as intended. 6) As a programmer, what is easy to do in the language?: Elixir is a functional language that relies onn pattern matching, which allows for easily accessing data and its contents. It is also very easy to create new types, modules, and abstract data types to extend the Elixir language to fit the engineer's specific needs. 7) What does the method to do the answer to 6 look like in general purpose languages like c or java?: In terms of data extraction, languages like c and java do not rely on pattern matching, which can make accessing data and its constituents clunkier. This would look like accessing members of a class for Java or fields in a struct for C. Moreover, defining new data types in Java would require making a new class, which is a lot more work than a simple ``` @type new_type :: {function, boolean} ```. In C, there is the idea of typedef, which can be used similarly to the Elixir example above. Neither Java nor C, however, supports the creation of abstract data types. 8) Does the programmer have to give up anything to gain the benefits of this language?: Elixir is a very young language, so although it is built on the tried and true Erlang, there is still a rather small community around Elixir, which means documentation may be scarce compared to a language such as Java or C.