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 `=` operator, we can bind the value of any type to a variable name - It is possible to re-bind variables - A variable may have any type of value bound to it # Modules Modules are the basis of code organization in Elixir - A module is visible to all other modules - A module is defined with `defmodule` ## Functions [[Functions in Elixir]] ## Naming Conventions - Module names must use [[Naming Conventions in Programming#Pascal Case|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 [[Naming Conventions in Programming#Snake Case|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 ```elixir string = :world IO.puts("hello #{string}") "hello world" ``` --- tags: #basics #elixir sources: - [Modules](https://elixirschool.com/en/lessons/basics/modules/#modules) - [Elixir Basics](https://exercism.org/tracks/elixir/concepts/basics) - [Named Functions](https://elixirschool.com/en/lessons/basics/functions/#named-functions) - [Basic Arithmetics](https://elixir-lang.org/getting-started/basic-types.html#basic-arithmetic) - [Strings in Elixir](https://elixir-lang.org/getting-started/basic-types.html#strings)