links: Elixir MOC


Elixir is a dynamically typed programming language which means the type of the variable is only checked at the run time

Variables

Using the match defmodule`

Functions

Functions in Elixir

Naming Conventions

  • Module names must use Pascal Case. A module name must start with an upper case A-Z and can contain A-Za-z and numbers 0-9, and underscores _
  • variable and function names must use Snake Case. A variable or function name must start with lowercase letter a-z or an underscore _, can contain letters a-zA-Z and numbers 0-9, and underscores _ and might end with a question mark ? or exclamation mark !

Integers

Integer values are whole numbers with one or more digits. you can perform basic mathematical operations on them

Strings

Strings in Elixir are delimited by double quotes, and they are encoded in UTF-8:

Elixir also supports string interpolation

string = :world
IO.puts("hello #{string}")
"hello world"

tags: basics elixir sources: