Elixir Beginner— How to save development time by less typing?

Malreddy Ankanna
blackode
Published in
3 min readApr 3, 2017

--

It may look small but not weak.

This article comprises of 7 things that matter in Elixir for writing the short lines with similar functionalities that we are doing with long lines of coding so far with out any fail.

Give less strain to fingers and live long…

1. Sigils

Sigils in Elixir are greatly used for the data transformation or simply data conversion.

Check the following example…

list_of_binaries = ["hello","I","am","blackode"]
["hello","I","am","blackode"]

This is the traditional approach to make the list of binaries in Elixir. However, you can do same thing with sigils .

list_of_binaries = ~w/hello I am blackode/
["hello", "I", "am", "blackode"]

So, you can save your time while coding. This sigil is default one. You can define your own sigils.

Check the article about CUSTOM SIGILS

2. Multiple Expressions On Single Line

You can use the semi colon ; to represent the end of the expressions in elixir.

x=1; y=2; z=3; a=4; b=5; c=6; d=7; e=8; f=9; 

--

--

Malreddy Ankanna
blackode

Programmer & Writer, I write about coding, thoughts, ideas, personal musings, technical articles, and tutorials.https://bio.link/blackode