An Interest In:
Web News this Week
- April 25, 2024
- April 24, 2024
- April 23, 2024
- April 22, 2024
- April 21, 2024
- April 20, 2024
- April 19, 2024
June 24, 2021 04:07 pm GMT
You can print a string using the
Original Link: https://dev.to/mridul037/learn-elixir-the-language-behind-watsapp-telegram-discord-and-pinterest-2c20
Learn Elixir the language behind Whatsapp,Telegram, Discord and Pinterest
Elixir is a dynamic, functional language for building scalable and maintainable applications.
Elixir leverages the Erlang VM, known for running low-latency, distributed, and fault-tolerant systems. Elixir is successfully used in web development, embedded software, data ingestion, and multimedia processing, across a wide range of industries. Here is a peek:
Performance feature's of elixir:
Scalability
- All Elixir code runs inside lightweight threads of execution (called processes) that are isolated and exchange information via messages
Erlang compatible
- Elixir runs on the Erlang VM giving developers complete access to Erlang's ecosystem, used by companies like Heroku, WhatsApp, Klarna and many more to build distributed, fault-tolerant applications
Fault-tolerance
- To cope with failures, Elixir provides supervisors which describe how to restart parts of your system when things go awry, going back to a known initial state that is guaranteed to work
If you havent yet installed Elixir, visit installation page. Once you are done, you can run
elixir --version
to get the current Elixir version.
lets start by running iex
means interactive elixir
some basic code
iex(1)> 40 + 242iex(2)> "hello" <> " world""hello world"iex> String.length("The quick brown fox jumps over the lazy dog")43
Support for binary, octal, and hexadecimal numbers comes built in:
iex> 0b01106iex> 0o644420iex> 0x1F31
ATOMS
iex> :apple:appleiex> :orange:orangeiex> :apple == :appletrueiex> :apple == :orangefalseiex> true == :truetrue
You can print a string using the IO.puts/1
function from the IO module
iex> IO.puts("hello
world")helloworld:ok
IO.puts/1
function returns the atom :ok after printing.
In next Article we will go more deep into Elixir Laguage.
Original Link: https://dev.to/mridul037/learn-elixir-the-language-behind-watsapp-telegram-discord-and-pinterest-2c20
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To