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
Naming Conventions
- Module names must use Pascal Case. A module name must start with an upper case
A-Zand can containA-Za-zand numbers0-9, and underscores_ - variable and function names must use Snake Case. A variable or function name must start with lowercase letter
a-zor an underscore_, can contain lettersa-zA-Zand numbers0-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"