Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
June 24, 2021 04:07 pm GMT

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:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To