Voltar aos Cursos
AI019 Profissional

Programando com Elixir

Um guia abrangente sobre programação funcional e concorrente usando Elixir. Aborda a transição do pensamento orientado a objetos para o pensamento funcional, correspondência de padrões, imutabilidade, o modelo ator para concorrência e a construção de sistemas distribuídos robustos com OTP.

4.8
30.0h
981 estudantes
10 lessons
0 curtidas
Inteligência Artificial
Começar a Aprender

Visão Geral do Curso

📚 Resumo do Conteúdo

Um guia abrangente sobre programação funcional e concorrente usando Elixir. Cobrirá a transição do pensamento orientado a objetos para o funcional, correspondência de padrões, imutabilidade, o modelo de ator para concorrência e a construção de sistemas distribuídos robustos com OTP.

Domine a arte de construir sistemas concorrentes resilientes por meio da beleza da programação funcional.

Autor: Dave Thomas

Agradecimentos: José Valim, Corey Haines, Bruce Tate, Jessica Kerr, Anthony Eden, Chad Fowler, Kim Shrier, Candace Cunningham e Potomac Indexing.

🎯 Objetivos de Aprendizagem

  1. Contraste o modelo de transformação de dados do Elixir com a programação convencional baseada em estado.
  2. Configure o shell interativo do Elixir (IEx) e execute códigos do Elixir via scripts e compilação.
  3. Aplique o operador de correspondência (=), o operador de pinça (^) e o curinga (_) para desestruturar e validar dados.
  4. Explique as implicações teóricas e práticas da imutabilidade sobre desempenho e gerenciamento de memória.
  5. Identifique e utilize os tipos internos do Elixir, incluindo tipos Valor, Sistema e Coleção.
  6. Aplique as regras de escopo de variáveis e a expressão with para gerenciar transformações de dados complexas.
  7. Crie e invoque funções anônimas usando ambas as notações padrão e de captura (&).
  8. Implemente funções nomeadas dentro de módulos usando correspondência de padrões e recursão para lidar com lógicas complexas.
  9. Aplique cláusulas de guarda e parâmetros padrão para controlar o fluxo de execução das funções.
  10. Desconstruir e Construir Listas: Use correspondência de padrões cabeça/cauda para navegar e construir estruturas listas recursivas.

Aulas

Lesson

This lesson introduces Elixir as a functional language focused on data transformation, emphasizing the importance of immutability and the use of the pipe operator for clean, predictable code. Students will also learn how Elixir’s actor-based concurrency model uses isolated processes and message passing to ensure thread safety and system scalability.

This lesson introduces the functional paradigm of Elixir, focusing on the core concept of data immutability and the use of pattern matching over variable mutation. Students will learn how to perform data transformations to create new values rather than modifying existing ones, ensuring predictable and thread-safe code.

This lesson explores foundational functional programming in Elixir, focusing on anonymous and named functions, module encapsulation, and the use of the pipe operator for data transformation. Students will also learn to leverage pattern matching and the `with` expression to handle complex, multi-step logic safely and effectively.

AI019: Recursive Lists and Data Structures (Lesson 4) explores the recursive nature of linked lists in Elixir, focusing on head-tail decomposition and the implementation of custom recursive functions. Students will learn to identify base cases, utilize the cons operator, and apply recursive patterns to perform efficient list operations.

This lesson explores the differences between greedy processing with the Enum module and lazy processing with the Stream module in Elixir. Students will learn to implement the Enumerable protocol and apply these concepts to perform memory-efficient data transformations and advanced string processing.

This lesson explores advanced Elixir control flow, focusing on pattern matching with case expressions, guard clauses, and the use of the with construct for error handling. Students will also learn to manage project structures using Mix and improve code quality through professional tooling like Credo and Dialyzer.

This lesson explores how to maintain persistent state in Elixir using recursive functions and Tail-Call Optimization (TCO) to keep processes alive. Students will learn to manage process lifecycles, handle message passing, and implement deterministic communication patterns in concurrent systems.

This lesson explores the fundamentals of the Open Telecom Platform (OTP) in Elixir, focusing on how behaviors, supervision trees, and I/O messaging enable the creation of fault-tolerant, distributed applications. Students will learn to implement GenServers and leverage the Error Kernel philosophy to build robust systems that effectively manage process lifecycles and inter-node communication.

This lesson explores advanced OTP architectures and the Five-Question Framework to achieve high-reliability state management in Elixir. Students will learn to design robust supervision trees and distributed systems by systematically defining environment constraints, focal points, and fault-tolerance strategies.

This lesson explores Elixir’s metaprogramming capabilities, focusing on how the language's homoiconic nature allows source code to be treated as data via the Abstract Syntax Tree (AST). Students will learn to design extensible software using protocols and macros while evaluating how static analysis tools like Dialyzer provide type safety without sacrificing dynamic flexibility.